proposition: Lemma lookup_op_link : ∀ p q o, lookup_op (p ∘ q) o = omap (λ f x, code_link (f x) q) (lookup_op p o).
proof: Proof. intros p q [id [S T]]. unfold lookup_op. unfold link. rewrite mapmE. destruct (p id) as [[S' [T' g]]|] eqn:e. 2: reflexivity. simpl. destruct choice_type_eqP. 2: reflexivity. destruct choice_type_eqP. 2: reflexivity. subst. cbn. reflexivity. 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) Equations.Prop.DepElim Equations(Equations) Crypt(FreeProbProg)