(*Conclusion is flexible -- use rule_tac or else apply_funtype below!*) lemma apply_type [TC]: "[f ∈ Pi(A,B); a ∈ A]==> f`a ∈ B(a)" by (blast intro: apply_Pair dest: fun_is_rel)
(*This version is acceptable to the simplifier*) lemma apply_funtype: "[f ∈ A->B; a ∈ A]==> f`a ∈ B" by (blast dest: apply_type)
lemma apply_iff: "f ∈ Pi(A,B) ==>⟨a,b⟩: f ⟷ a ∈ A ∧ f`a = b" apply (frule fun_is_rel) apply (blast intro!: apply_Pair apply_equality) done
(*Refining one Pi type to another*) lemma Pi_type: "[f ∈ Pi(A,C); ∧x. x ∈ A ==> f`x ∈ B(x)]==> f ∈ Pi(A,B)" apply (simp only: Pi_iff) apply (blast dest: function_apply_equality) done
(*Such functions arise in non-standard datatypes, ZF/ex/Ntree for instance*) lemma Pi_Collect_iff: "(f ∈ Pi(A, λx. {y ∈ B(x). P(x,y)})) ⟷ f ∈ Pi(A,B) ∧ (∀x∈A. P(x, f`x))" by (blast intro: Pi_type dest: apply_type)
lemma Pi_weaken_type: "[f ∈ Pi(A,B); ∧x. x ∈ A ==> B(x)<=C(x)]==> f ∈ Pi(A,C)" by (blast intro: Pi_type dest: apply_type)
(** Elimination of membership in a function **)
lemma domain_type: "[⟨a,b⟩∈ f; f ∈ Pi(A,B)]==> a ∈ A" by (blast dest: fun_is_rel)
lemma range_type: "[⟨a,b⟩∈ f; f ∈ Pi(A,B)]==> b ∈ B(a)" by (blast dest: fun_is_rel)
lemma Pair_mem_PiD: "[⟨a,b⟩: f; f ∈ Pi(A,B)]==> a ∈ A ∧ b ∈ B(a) ∧ f`a = b" by (blast intro: domain_type range_type apply_equality)
subsection‹Lambda Abstraction›
lemma lamI: "a ∈ A ==> <a,b(a)> ∈ (λx∈A. b(x))" unfolding lam_def apply (erule RepFunI) done
lemma lamE: "[p: (λx∈A. b(x)); ∧x.[x ∈ A; p=<x,b(x)>]==> P \<rbrakk> ==> P" by (simp add: lam_def, blast)
lemma lamD: "[⟨a,c⟩: (λx∈A. b(x))]==> c = b(a)" by (simp add: lam_def)
lemma lam_type [TC]: "[∧x. x ∈ A ==> b(x): B(x)]==> (λx∈A. b(x)) ∈ Pi(A,B)" by (simp add: lam_def Pi_def function_def, blast)
lemma lam_funtype: "(λx∈A. b(x)) ∈ A -> {b(x). x ∈ A}" by (blast intro: lam_type)
lemma function_lam: "function (λx∈A. b(x))" by (simp add: function_def lam_def)
lemma relation_lam: "relation (λx∈A. b(x))" by (simp add: relation_def lam_def)
lemma beta_if [simp]: "(λx∈A. b(x)) ` a = (if a ∈ A then b(a) else 0)" by (simp add: apply_def lam_def, blast)
lemma beta: "a ∈ A ==> (λx∈A. b(x)) ` a = b(a)" by (simp add: apply_def lam_def, blast)
lemma fun_extension_iff: "[f ∈ Pi(A,B); g ∈ Pi(A,C)]==> (∀a∈A. f`a = g`a) ⟷ f=g" by (blast intro: fun_extension)
(*thm by Mark Staples, proof by lcp*) lemma fun_subset_eq: "[f ∈ Pi(A,B); g ∈ Pi(A,C)]==> f ⊆ g ⟷ (f = g)" by (blast dest: apply_Pair
intro: fun_extension apply_equality [symmetric])
(*Every element of Pi(A,B) may be expressed as a lambda abstraction!*) lemma Pi_lamE: assumes major: "f ∈ Pi(A,B)" and minor: "∧b. [∀x∈A. b(x):B(x); f = (λx∈A. b(x))]==> P" shows"P" apply (rule minor) apply (rule_tac [2] eta [symmetric]) apply (blast intro: major apply_type)+ done
subsection‹Images of Functions›
lemma image_lam: "C ⊆ A ==> (λx∈A. b(x)) `` C = {b(x). x ∈ C}" by (unfold lam_def, blast)
(*For this lemma and the next, the right-hand side could equivalently
be written \<Union>x\<in>C. {f`x} *) lemma image_function: "[function(f); C ⊆ domain(f)]==> f``C = {f`x. x ∈ C}" by (simp add: Repfun_function_if)
(*Not easy to express monotonicity in P, since any "bigger" predicate
would have to be single-valued*) lemma Replace_mono: "A<=B ==> Replace(A,P) ⊆ Replace(B,P)" by (blast elim!: ReplaceE)
lemma RepFun_mono: "A<=B ==> {f(x). x ∈ A} ⊆ {f(x). x ∈ B}" by blast
lemma Pow_mono: "A<=B ==> Pow(A) ⊆ Pow(B)" by blast
lemma Union_mono: "A<=B ==>∪(A) ⊆∪(B)" by blast
lemma UN_mono: "[A<=C; ∧x. x ∈ A ==> B(x)<=D(x)]==> (∪x∈A. B(x)) ⊆ (∪x∈C. D(x))" by blast
(*Intersection is ANTI-monotonic. There are TWO premises! *) lemma Inter_anti_mono: "[A<=B; A≠0]==>∩(B) ⊆∩(A)" by blast
lemma cons_mono: "C<=D ==> cons(a,C) ⊆ cons(a,D)" by blast
lemma Un_mono: "[A<=C; B<=D]==> A ∪ B ⊆ C ∪ D" by blast
lemma Int_mono: "[A<=C; B<=D]==> A ∩ B ⊆ C ∩ D" by blast
lemma Diff_mono: "[A<=C; D<=B]==> A-B ⊆ C-D" by blast
subsubsection‹Standard Products, Sums and Function Spaces›
lemma Sigma_mono [rule_format]: "[A<=C; ∧x. x ∈ A ⟶ B(x) ⊆ D(x)]==> Sigma(A,B) ⊆ Sigma(C,D)" by blast
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.