Documentation

Cedar.Thm.SymCC.Term.Interpret.Factory

Interpretation of Factory functions #

This file basic lemmas about the interpretation of Factory functions. #

map (interpret ∘ option.get) commutes with map (option.get' ∘ interpret).

theorem Cedar.Thm.interpret_foldr_ifSome {εs : SymCC.SymEntities} {I : SymCC.Interpretation} {ty : SymCC.TermType} {P : SymCC.Term} (hI : I.WellFormed εs) (hP : SymCC.Term.WellFormed εs P) (hPty : P.typeOf = ty.option) (ts : List SymCC.Term) :
(∀ (t : SymCC.Term), t ∈ ts → SymCC.Term.WellFormed εs t) → SymCC.Term.interpret I (List.foldr (fun (tᵢ acc : SymCC.Term) => SymCC.Factory.ifSome tᵢ acc) P ts) = List.foldr (fun (tᵢ acc : SymCC.Term) => SymCC.Factory.ifSome tᵢ acc) (SymCC.Term.interpret I P) (List.map (SymCC.Term.interpret I) ts)

Push interpret through a foldr ifSome over well-formed guards.