text\<open>the function fst as an element of a function type\<close>
schematic_goal [folded basic_defs]: "A type \ ?a: \f:?B . \i:A. \j:A. Eq(A, f ` , i)" apply intr apply eqintr apply (rule_tac [2] reduction_rls) apply (rule_tac [4] comp_rls) apply typechk txt"now put in A everywhere" apply assumption+ done
text\<open>An interesting use of the eliminator, when\<close> (*The early implementation of unification caused non-rigid path in occur check
See following example.*)
schematic_goal "?a : \i:N. Eq(?A, ?b(inl(i)), <0 , i>) \<times> Eq(?A, ?b(inr(i)), <succ(0), i>)" apply intr apply eqintr apply (rule comp_rls) apply rew done
(*Here we allow the type to depend on i. This prevents the cycle in the first unification (no longer needed). Requires flex-flex to preserve the dependence.
Simpler still: make ?A into a constant type N \<times> N.*)
schematic_goal "?a : \i:N. Eq(?A(i), ?b(inl(i)), <0 , i>) \<times> Eq(?A(i), ?b(inr(i)), <succ(0),i>)" oops
(*similar but allows the type to depend on i and j*)
schematic_goal "?a : \i:N. \j:N. Eq(?A(i,j), ?b(inl()), i) \<times> Eq(?A(i,j), ?b(inr(<i,j>)), j)" oops
(*similar but specifying the type N simplifies the unification problems*)
schematic_goal "?a : \i:N. \j:N. Eq(N, ?b(inl()), i) \<times> Eq(N, ?b(inr(<i,j>)), j)" oops
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.