proposition: Lemma rswap_assertD_assertD_eq : ∀ (A : choice_type) b₀ b₁ (r : _ → _ → raw_code A), ⊢ ⦃ λ '(h₀, h₁), h₀ = h₁ ⦄ #assert b₀ as e₀ ;; #assert b₁ as e₁ ;; r e₀ e₁ ≈ #assert b₁ as e₁ ;; #assert b₀ as e₀ ;; r e₀ e₁ ⦃ eq ⦄.
proof: Proof. intros A b₀ b₁ r. destruct b₀. - simpl. apply rreflexivity_rule. - simpl. destruct b₁. + simpl. apply r_fail. + simpl. apply r_fail. Qed.
imports: Coq(Utf8) Relational(OrderEnrichedCategory OrderEnrichedRelativeMonadExamples) mathcomp(ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice reals distr seq all_algebra fintype realsum) extructures(ord fset fmap) Mon(SPropBase) Crypt(Prelude Axioms ChoiceAsOrd SubDistr Couplings RulesStateProb UniformStateProb UniformDistrLemmas StateTransfThetaDens StateTransformingLaxMorph choice_type pkg_core_definition pkg_notation pkg_tactics pkg_composition pkg_heap pkg_semantics pkg_lookup pkg_advantage pkg_invariants pkg_distr) Equations.Prop.DepElim Equations(Equations) Crypt(FreeProbProg)