text‹the function fst as an element of a function type›
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‹An interesting use of the eliminator, when› (*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>) × Eq(?A, ?b(inr(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>) × Eq(?A(i), ?b(inr(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) × Eq(?A(i,j), ?b(inr()), j)" oops
(*similar but specifying the type N simplifies the unification problems*)
schematic_goal "?a : ∏i:N. ∏j:N. Eq(N, ?b(inl()), i) × Eq(N, ?b(inr()), 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.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.