proposition: Lemma for_loop_rule : (∀ i, ⊢ ⦃ I i ⦄ c₀ i ≈ c₁ i ⦃ λ '(_, s₀) '(_, s₁), I i.+1 (s₀,s₁) ⦄) → ⊢ ⦃ I 0%nat ⦄ for_loop c₀ N ≈ for_loop c₁ N ⦃ λ '(_,s₀) '(_,s₁), I N.+1 (s₀,s₁) ⦄.
proof: Proof. intros h. induction N as [| n ih]. - simpl. apply h. - simpl. eapply r_bind. + eapply ih. + simpl. intros _ _. eapply rpre_weaken_rule. 1: eapply h. auto. 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)