proposition: Lemma lem_commute_if : forall b1 b2 c1 c2 c3, If b1 Then (If b2 Then c1 Else c2) Else c3 ~~ If b2 Then (If b1 Then c1 Else c3) Else (If b1 Then c2 Else c3).
proof: Proof. unfold equiv_cmd. intros *. time (destruct (bval s b1) eqn:?; destruct (bval s b2) eqn:?; sauto). Undo. time (destruct (bval s b1) eqn:?; destruct (bval s b2) eqn:?; sauto inv: BigStep ctrs: BigStep). Undo. time (destruct (bval s b1) eqn:?; destruct (bval s b2) eqn:?; sauto quick: on inv: BigStep ctrs: BigStep). Undo. time (destruct (bval s b1) eqn:?; destruct (bval s b2) eqn:?; sauto lazy: on inv: BigStep ctrs: BigStep). Undo. time (destruct (bval s b1) eqn:?; destruct (bval s b2) eqn:?; sauto lazy: on quick: on inv: BigStep ctrs: BigStep). Undo. time (destruct (bval s b1) eqn:?; destruct (bval s b2) eqn:?; sauto lq: on inv: BigStep ctrs: BigStep). Qed.
imports: Hammer(Tactics Reflect) String Arith Lia