(* Title: ZF/upair.thy Author: Lawrence C Paulson and Martin D Coen, CU Computer Laboratory Copyright 1993 University of Cambridge Observe the order of dependence: Upair is defined in terms of Replace ∪ is defined in terms of Upair and ∪(similarly for Int) cons is defined in terms of Upair and Un Ordered pairs and descriptions are defined using cons ("set notation") *)
section‹Unordered Pairs›
theory upair imports ZF_Base
keywords "print_tcset" :: diag begin
subsection‹Rules for Binary Union, Defined via 🍋‹Upair›\›
lemma Un_iff [simp]: "c ∈ A ∪ B ⟷ (c ∈ A | c ∈ B)" apply (simp add: Un_def) apply (blast intro: UpairI1 UpairI2 elim: UpairE) done
lemma UnI1: "c ∈ A ==> c ∈ A ∪ B" by simp
lemma UnI2: "c ∈ B ==> c ∈ A ∪ B" by simp
declare UnI1 [elim?] UnI2 [elim?]
lemma UnE [elim!]: "[c ∈ A ∪ B; c ∈ A ==> P; c ∈ B ==> P]==> P" by (simp, blast)
(*Stronger version of the rule above*) lemma UnE': "[c ∈ A ∪ B; c ∈ A ==> P; [c ∈ B; c∉A]==> P]==> P" by (simp, blast)
(*Classical introduction rule: no commitment to A vs B*) lemma UnCI [intro!]: "(c ∉ B ==> c ∈ A) ==> c ∈ A ∪ B" by (simp, blast)
subsection‹Rules for Binary Intersection, Defined via 🍋‹Upair›\ lemma Int_iff [simp]: "c ∈ A ∩ B ⟷ (c ∈ A ∧ c ∈ B)" unfolding Int_def apply (blast intro: UpairI1 UpairI2 elim: UpairE) done
lemma IntI [intro!]: "[c ∈ A; c ∈ B]==> c ∈ A ∩ B" by simp
lemma IntD1: "c ∈ A ∩ B ==> c ∈ A" by simp
lemma IntD2: "c ∈ A ∩ B ==> c ∈ B" by simp
lemma IntE [elim!]: "[c ∈ A ∩ B; [c ∈ A; c ∈ B]==> P]==> P" by simp
subsection‹Rules for Set Difference, Defined via 🍋‹Upair›\ lemma Diff_iff [simp]: "c ∈ A-B ⟷ (c ∈ A ∧ c∉B)" by (unfold Diff_def, blast)
lemma DiffI [intro!]: "[c ∈ A; c ∉ B]==> c ∈ A - B" by simp
lemma DiffD1: "c ∈ A - B ==> c ∈ A" by simp
lemma DiffD2: "c ∈ A - B ==> c ∉ B" by simp
lemma DiffE [elim!]: "[c ∈ A - B; [c ∈ A; c∉B]==> P]==> P" by simp
(*Easier to apply than theI: conclusion has only one occurrence of P*) lemma theI2: assumes p1: "¬ Q(0) ==>∃!x. P(x)" and p2: "∧x. P(x) ==> Q(x)" shows"Q(THE x. P(x))" apply (rule classical) apply (rule p2) apply (rule theI) apply (rule classical) apply (rule p1) apply (erule the_0 [THEN subst], assumption) done
lemma the_eq_trivial [simp]: "(THE x. x = a) = a" by blast
lemma the_eq_trivial2 [simp]: "(THE x. a = x) = a" by blast
subsection‹Conditional Terms: ‹if-then-else›\ lemma if_true [simp]: "(if True then a else b) = a" by (unfold if_def, blast)
lemma if_false [simp]: "(if False then a else b) = b" by (unfold if_def, blast)
(*Never use with case splitting, or if P is known to be true or false*) lemma if_cong: "[P⟷Q; Q ==> a=c; ¬Q ==> b=d] ==> (if P then a else b) = (if Q then c else d)" by (simp add: if_def cong add: conj_cong)
(*Prevents simplification of x and y \<in> faster and allows the execution of functional programs. NOW THE DEFAULT.*) lemma if_weak_cong: "P⟷Q ==> (if P then x else y) = (if Q then x else y)" by simp
(*Not needed for rewriting, since P would rewrite to True anyway*) lemma if_P: "P ==> (if P then a else b) = a" by (unfold if_def, blast)
(*Not needed for rewriting, since P would rewrite to False anyway*) lemma if_not_P: "¬P ==> (if P then a else b) = b" by (unfold if_def, blast)
lemma split_if [split]: "P(if Q then x else y) ⟷ ((Q ⟶ P(x)) ∧ (¬Q ⟶ P(y)))" by (case_tac Q, simp_all)
(** Rewrite rules for boolean case-splitting: faster than split_if [split] **)
lemmas split_if_eq1 = split_if [of "λx. x = b"] for b lemmas split_if_eq2 = split_if [of "λx. a = x"] for a
lemmas split_if_mem1 = split_if [of "λx. x ∈ b"] for b lemmas split_if_mem2 = split_if [of "λx. a ∈ x"] for a
(*** Miniscoping: pushing in big Unions, Intersections, quantifiers, etc. ***)
lemma misc_simps [simp]: "0 ∪ A = A" "A ∪ 0 = A" "0 ∩ A = 0" "A ∩ 0 = 0" "0 - A = 0" "A - 0 = A" "∪(0) = 0" "∪(cons(b,A)) = b ∪∪(A)" "∩({b}) = b" by blast+
end
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.19Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-04-26)
¤
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.