# What is the difference between "implication", "implies", and 'if-else"?

**URL:** <https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328>\
**Category:** SystemVerilog\
**Tags:** implies, SystemVerilog, implication, property\
**Created:** [April 30, 2022, 6:26am UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328 "2022-04-30T06:26:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jh\_veryveri](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@jh\_veryveri](https://verificationacademy.com/forums/u/jh_veryveri)\
**Post date:** [April 30, 2022, 6:26am UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/1 "2022-04-30T06:26:13Z")

</div>

Hello.

I’m studying an assertion to the IEEE 1800-2017 standard for SystemVerilog. I read the “implication” and “if-else” properties. I think they are pretty similar. When I read the “implies” property, I was confused as the 3 statements are similar meanings. What is the difference between these three statements? Please provide explanations and examples.

Thanks to your reply.

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [April 30, 2022, 7:11pm UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/2 "2022-04-30T19:11:07Z")

</div>

_In reply to [jh\_veryveri](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328):_

Yes these properties have similar and in some cases overlapping functionality. They all have the form _Antecedent_ operator _Consequent_.

Implication is the most common and has the form

```verilog
sequence_expr_A |-> property_expr_C

```

This means the property\_expr must be true starting from the cycle that sequence\_expr has a match. When the sequence\_expr is just a 1-cycle boolean expression, you can write this as

```verilog
if ( boolean_expr ) property_expr
// same as 
boolean_expr_A |-> property_expr_C

```

Most people still chose the implication using using a simple **if**. The expressiveness comes from using the **if** with an accompanying **else**

```verilog
if ( boolean_expr_A ) property_expr_C1 else property_expr_C2
// same as 
  boolean_expr_A |-> property_expr_C1
! boolean_expr_A |-> property_expr_C2

```

```verilog
property_expr_A implies property_expr_C

```

The above property overlaps the functionality of implication when the antecedent is just a 1-cycle boolean expression. However when the antecedent is a sequence or property, the consequent gets evaluated concurrently with the antecedent instead of waiting for the antecedent to become true. This **implies** property operator is for very complicated properties and usually involved nested multi-clock implication properties.

---

<div class="post-metadata">

**Author:** ![jh\_veryveri](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@jh\_veryveri](https://verificationacademy.com/forums/u/jh_veryveri)\
**Post date:** [May 2, 2022, 1:11am UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/3 "2022-05-02T01:11:06Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/2):_

Hello, Dave.

Thanks to your explanation. It helps to understand “implication statement” for me.

I have a question more. The standard document says

```verilog
property_expr1 implies property_expr2
// A property of this form evaluates to true if, and only if, either property_expr1 evaluates to false or property_expr2 evaluates to true.

```

And, you explained that

> However when the antecedent is a sequence or property, the consequent gets evaluated concurrently with the antecedent instead of waiting for the antecedent to become true.

Is the property true regardless of the outcome of the antecedent if the evaluation of the consequent is completed for true during the evaluation of the antecedent?  
If the consequent is false in this case, is the property false?

Thanks always for your explanations and comments.

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [May 2, 2022, 2:45pm UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/4 "2022-05-02T14:45:04Z")

</div>

_In reply to [jh\_veryveri](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/3):_

That is correct, the property is true once the consequent becomes true. Another level of complexity is the concept of vacuous and non-vacuous success. An assertion of this kind of property only succeeds (passes) if both the antecedent and consequent are true.

---

<div class="post-metadata">

**Author:** ![jh\_veryveri](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@jh\_veryveri](https://verificationacademy.com/forums/u/jh_veryveri)\
**Post date:** [May 3, 2022, 2:36am UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/5 "2022-05-03T02:36:42Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/what-is-the-difference-between-implication-implies-and-if-else/40328/4):_

Thanks to your reply, Dave.

The subsequent expression must be true for the property to be non-vacuous true! If the sequence expression is false, the property seems to be vacuous true.

Thanks.
