@@ -15,6 +15,8 @@ relation is `G.adj` for `G : simple_graph α`, this corresponds to independent s
15
15
## Definitions
16
16
17
17
* `is_antichain r s`: Any two elements of `s : set α` are unrelated by `r : α → α → Prop`.
18
+ * `is_strong_antichain r s`: Any two elements of `s : set α` are not related by `r : α → α → Prop`
19
+ to a common element.
18
20
* `is_antichain.mk r s`: Turns `s` into an antichain by keeping only the "maximal" elements.
19
21
-/
20
22
@@ -37,24 +39,24 @@ lemma mono_on (hs : is_antichain r₁ s) (h : s.pairwise (λ ⦃a b⦄, r₂ a b
37
39
is_antichain r₂ s :=
38
40
hs.imp_on $ h.imp $ λ a b h h₁ h₂, h₁ $ h h₂
39
41
40
- lemma eq_of_related (hs : is_antichain r s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) (h : r a b) :
42
+ protected lemma eq (hs : is_antichain r s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) (h : r a b) :
41
43
a = b :=
42
- of_not_not $ λ hab, hs ha hb hab h
44
+ hs.eq ha hb $ not_not_intro h
43
45
44
- lemma eq_of_related ' (hs : is_antichain r s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) (h : r b a) :
46
+ protected lemma eq ' (hs : is_antichain r s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) (h : r b a) :
45
47
a = b :=
46
- (hs.eq_of_related hb ha h).symm
48
+ (hs.eq hb ha h).symm
47
49
48
50
protected lemma is_antisymm (h : is_antichain r univ) : is_antisymm α r :=
49
- ⟨λ a b ha _, h.eq_of_related trivial trivial ha⟩
51
+ ⟨λ a b ha _, h.eq trivial trivial ha⟩
50
52
51
53
protected lemma subsingleton [is_trichotomous α r] (h : is_antichain r s) : s.subsingleton :=
52
54
begin
53
55
rintro a ha b hb,
54
56
obtain hab | hab | hab := trichotomous_of r a b,
55
- { exact h.eq_of_related ha hb hab },
57
+ { exact h.eq ha hb hab },
56
58
{ exact hab },
57
- { exact (h.eq_of_related hb ha hab).symm }
59
+ { exact h.eq' ha hb hab }
58
60
end
59
61
60
62
protected lemma flip (hs : is_antichain r s) : is_antichain (flip r) s :=
@@ -104,11 +106,11 @@ section preorder
104
106
variables [preorder α]
105
107
106
108
lemma is_antichain_and_least_iff : is_antichain (≤) s ∧ is_least s a ↔ s = {a} :=
107
- ⟨λ h, eq_singleton_iff_unique_mem.2 ⟨h.2 .1 , λ b hb, h.1 .eq_of_related ' hb h.2 .1 (h.2 .2 hb)⟩,
109
+ ⟨λ h, eq_singleton_iff_unique_mem.2 ⟨h.2 .1 , λ b hb, h.1 .eq ' hb h.2 .1 (h.2 .2 hb)⟩,
108
110
by { rintro rfl, exact ⟨is_antichain_singleton _ _, is_least_singleton⟩ }⟩
109
111
110
112
lemma is_antichain_and_greatest_iff : is_antichain (≤) s ∧ is_greatest s a ↔ s = {a} :=
111
- ⟨λ h, eq_singleton_iff_unique_mem.2 ⟨h.2 .1 , λ b hb, h.1 .eq_of_related hb h.2 .1 (h.2 .2 hb)⟩,
113
+ ⟨λ h, eq_singleton_iff_unique_mem.2 ⟨h.2 .1 , λ b hb, h.1 .eq hb h.2 .1 (h.2 .2 hb)⟩,
112
114
by { rintro rfl, exact ⟨is_antichain_singleton _ _, is_greatest_singleton⟩ }⟩
113
115
114
116
lemma is_antichain.least_iff (hs : is_antichain (≤) s) : is_least s a ↔ s = {a} :=
@@ -130,3 +132,65 @@ lemma is_antichain.top_mem_iff [order_top α] (hs : is_antichain (≤) s) : ⊤
130
132
is_greatest_top_iff.symm.trans hs.greatest_iff
131
133
132
134
end preorder
135
+
136
+ /-! ### Strong antichains -/
137
+
138
+ /-- An strong (upward) antichain is a set such that no two distinct elements are related to a common
139
+ element. -/
140
+ def is_strong_antichain (r : α → α → Prop ) (s : set α) : Prop :=
141
+ s.pairwise $ λ a b, ∀ c, ¬ r a c ∨ ¬ r b c
142
+
143
+ namespace is_strong_antichain
144
+
145
+ protected lemma subset (hs : is_strong_antichain r s) (h : t ⊆ s) : is_strong_antichain r t :=
146
+ hs.mono h
147
+
148
+ lemma mono (hs : is_strong_antichain r₁ s) (h : r₂ ≤ r₁) : is_strong_antichain r₂ s :=
149
+ hs.mono' $ λ a b hab c, (hab c).imp (compl_le_compl h _ _) (compl_le_compl h _ _)
150
+
151
+ lemma eq (hs : is_strong_antichain r s) {a b c : α} (ha : a ∈ s) (hb : b ∈ s) (hac : r a c)
152
+ (hbc : r b c) :
153
+ a = b :=
154
+ hs.eq ha hb $ λ h, false.elim $ (h c).elim (not_not_intro hac) (not_not_intro hbc)
155
+
156
+ protected lemma is_antichain [is_refl α r] (h : is_strong_antichain r s) : is_antichain r s :=
157
+ h.imp $ λ a b hab, (hab b).resolve_right (not_not_intro $ refl _)
158
+
159
+ protected lemma subsingleton [is_directed α r] (h : is_strong_antichain r s) : s.subsingleton :=
160
+ λ a ha b hb, let ⟨c, hac, hbc⟩ := directed_of r a b in h.eq ha hb hac hbc
161
+
162
+ protected lemma flip [is_symm α r] (hs : is_strong_antichain r s) :
163
+ is_strong_antichain (flip r) s :=
164
+ λ a ha b hb h c, (hs ha hb h c).imp (mt $ symm_of r) (mt $ symm_of r)
165
+
166
+ lemma swap [is_symm α r] (hs : is_strong_antichain r s) : is_strong_antichain (swap r) s := hs.flip
167
+
168
+ lemma image (hs : is_strong_antichain r s) {f : α → β} (hf : surjective f)
169
+ (h : ∀ a b, r' (f a) (f b) → r a b) :
170
+ is_strong_antichain r' (f '' s) :=
171
+ begin
172
+ rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ hab c,
173
+ obtain ⟨c, rfl⟩ := hf c,
174
+ exact (hs ha hb (ne_of_apply_ne _ hab) _).imp (mt $ h _ _) (mt $ h _ _),
175
+ end
176
+
177
+ lemma preimage (hs : is_strong_antichain r s) {f : β → α} (hf : injective f)
178
+ (h : ∀ a b, r' a b → r (f a) (f b)) :
179
+ is_strong_antichain r' (f ⁻¹' s) :=
180
+ λ a ha b hb hab c, (hs ha hb (hf.ne hab) _).imp (mt $ h _ _) (mt $ h _ _)
181
+
182
+ lemma _root_.is_strong_antichain_insert :
183
+ is_strong_antichain r (insert a s) ↔ is_strong_antichain r s ∧
184
+ ∀ ⦃b⦄, b ∈ s → a ≠ b → ∀ c, ¬ r a c ∨ ¬ r b c :=
185
+ set.pairwise_insert_of_symmetric $ λ a b h c, (h c).symm
186
+
187
+ protected lemma insert (hs : is_strong_antichain r s)
188
+ (h : ∀ ⦃b⦄, b ∈ s → a ≠ b → ∀ c, ¬ r a c ∨ ¬ r b c) :
189
+ is_strong_antichain r (insert a s) :=
190
+ is_strong_antichain_insert.2 ⟨hs, h⟩
191
+
192
+ end is_strong_antichain
193
+
194
+ lemma set.subsingleton.is_strong_antichain (hs : s.subsingleton) (r : α → α → Prop ) :
195
+ is_strong_antichain r s :=
196
+ hs.pairwise _
0 commit comments