@@ -102,6 +102,8 @@ space, or more generally a module. We omit the arguments `(k : Type*) [ring k] [
102
102
in the type synonym itself to simplify type class search. -/
103
103
notation `affine_space ` := add_torsor
104
104
105
+ open set
106
+
105
107
section
106
108
107
109
variables (k : Type *) {V : Type *} {P : Type *} [ring k] [add_comm_group V] [module k V]
@@ -110,36 +112,36 @@ include V
110
112
111
113
/-- The submodule spanning the differences of a (possibly empty) set
112
114
of points. -/
113
- def vector_span (s : set P) : submodule k V := submodule.span k (vsub_set s)
115
+ def vector_span (s : set P) : submodule k V := submodule.span k (s -ᵥ s)
114
116
115
117
/-- The definition of `vector_span`, for rewriting. -/
116
- lemma vector_span_def (s : set P) : vector_span k s = submodule.span k (vsub_set s) :=
118
+ lemma vector_span_def (s : set P) : vector_span k s = submodule.span k (s -ᵥ s) :=
117
119
rfl
118
120
119
121
/-- `vector_span` is monotone. -/
120
122
lemma vector_span_mono {s₁ s₂ : set P} (h : s₁ ⊆ s₂) : vector_span k s₁ ≤ vector_span k s₂ :=
121
- submodule.span_mono (vsub_set_mono h)
123
+ submodule.span_mono (vsub_self_mono h)
122
124
123
125
variables (P)
124
126
125
127
/-- The `vector_span` of the empty set is `⊥`. -/
126
128
@[simp] lemma vector_span_empty : vector_span k (∅ : set P) = (⊥ : submodule k V) :=
127
- by rw [vector_span_def, vsub_set_empty , submodule.span_empty]
129
+ by rw [vector_span_def, vsub_empty , submodule.span_empty]
128
130
129
131
variables {P}
130
132
131
133
/-- The `vector_span` of a single point is `⊥`. -/
132
134
@[simp] lemma vector_span_singleton (p : P) : vector_span k ({p} : set P) = ⊥ :=
133
135
by simp [vector_span_def]
134
136
135
- /-- The `vsub_set ` lies within the `vector_span`. -/
136
- lemma vsub_set_subset_vector_span (s : set P) : vsub_set s ⊆ vector_span k s :=
137
+ /-- The `s -ᵥ s ` lies within the `vector_span k s `. -/
138
+ lemma vsub_set_subset_vector_span (s : set P) : s -ᵥ s ⊆ ↑( vector_span k s) :=
137
139
submodule.subset_span
138
140
139
141
/-- Each pairwise difference is in the `vector_span`. -/
140
142
lemma vsub_mem_vector_span {s : set P} {p1 p2 : P} (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) :
141
143
p1 -ᵥ p2 ∈ vector_span k s :=
142
- vsub_set_subset_vector_span k s (vsub_mem_vsub_set hp1 hp2)
144
+ vsub_set_subset_vector_span k s (vsub_mem_vsub hp1 hp2)
143
145
144
146
/-- The points in the affine span of a (possibly empty) set of
145
147
points. Use `affine_span` instead to get an `affine_subspace k P`. -/
@@ -252,25 +254,25 @@ in the definition of `submodule.span`) can be used in the proof of
252
254
that proof. -/
253
255
def direction_of_nonempty {s : affine_subspace k P} (h : (s : set P).nonempty) :
254
256
submodule k V :=
255
- { carrier := vsub_set (s : set P),
257
+ { carrier := (s : set P) -ᵥ s ,
256
258
zero_mem' := begin
257
259
cases h with p hp,
258
- exact (vsub_self p) ▸ vsub_mem_vsub_set hp hp
260
+ exact (vsub_self p) ▸ vsub_mem_vsub hp hp
259
261
end ,
260
262
add_mem' := begin
261
263
intros a b ha hb,
262
264
rcases ha with ⟨p1, p2, hp1, hp2, rfl⟩,
263
265
rcases hb with ⟨p3, p4, hp3, hp4, rfl⟩,
264
266
rw [←vadd_vsub_assoc],
265
- refine vsub_mem_vsub_set _ hp4,
267
+ refine vsub_mem_vsub _ hp4,
266
268
convert s.smul_vsub_vadd_mem 1 hp1 hp2 hp3,
267
269
rw one_smul
268
270
end ,
269
271
smul_mem' := begin
270
272
intros c v hv,
271
273
rcases hv with ⟨p1, p2, hp1, hp2, rfl⟩,
272
274
rw [←vadd_vsub (c • (p1 -ᵥ p2)) p2],
273
- refine vsub_mem_vsub_set _ hp2,
275
+ refine vsub_mem_vsub _ hp2,
274
276
exact s.smul_vsub_vadd_mem c hp1 hp2 hp2
275
277
end }
276
278
@@ -283,7 +285,7 @@ le_antisymm (vsub_set_subset_vector_span k s) (submodule.span_le.2 set.subset.rf
283
285
/-- The set of vectors in the direction of a nonempty affine subspace
284
286
is given by `vsub_set`. -/
285
287
lemma coe_direction_eq_vsub_set {s : affine_subspace k P} (h : (s : set P).nonempty) :
286
- (s.direction : set V) = vsub_set (s : set P) :=
288
+ (s.direction : set V) = (s : set P) -ᵥ s :=
287
289
direction_of_nonempty_eq_direction h ▸ rfl
288
290
289
291
/-- A vector is in the direction of a nonempty affine subspace if and
@@ -704,7 +706,7 @@ variables (P)
704
706
705
707
/-- The direction of `⊥` is the submodule `⊥`. -/
706
708
@[simp] lemma direction_bot : (⊥ : affine_subspace k P).direction = ⊥ :=
707
- by rw [direction_eq_vector_span, bot_coe, vector_span_def, vsub_set_empty , submodule.span_empty]
709
+ by rw [direction_eq_vector_span, bot_coe, vector_span_def, vsub_empty , submodule.span_empty]
708
710
709
711
variables {k V P}
710
712
@@ -739,8 +741,8 @@ lemma direction_inf (s1 s2 : affine_subspace k P) :
739
741
begin
740
742
repeat { rw [direction_eq_vector_span, vector_span_def] },
741
743
exact le_inf
742
- (Inf_le_Inf (λ p hp, set.subset. trans (vsub_set_mono (set. inter_subset_left _ _)) hp))
743
- (Inf_le_Inf (λ p hp, set.subset. trans (vsub_set_mono (set. inter_subset_right _ _)) hp))
744
+ (Inf_le_Inf (λ p hp, trans (vsub_self_mono ( inter_subset_left _ _)) hp))
745
+ (Inf_le_Inf (λ p hp, trans (vsub_self_mono ( inter_subset_right _ _)) hp))
744
746
end
745
747
746
748
/-- If two affine subspaces have a point in common, the direction of
@@ -789,8 +791,8 @@ lemma sup_direction_le (s1 s2 : affine_subspace k P) :
789
791
begin
790
792
repeat { rw [direction_eq_vector_span, vector_span_def] },
791
793
exact sup_le
792
- (Inf_le_Inf (λ p hp, set.subset.trans (vsub_set_mono (le_sup_left : s1 ≤ s1 ⊔ s2)) hp))
793
- (Inf_le_Inf (λ p hp, set.subset.trans (vsub_set_mono (le_sup_right : s2 ≤ s1 ⊔ s2)) hp))
794
+ (Inf_le_Inf (λ p hp, set.subset.trans (vsub_self_mono (le_sup_left : s1 ≤ s1 ⊔ s2)) hp))
795
+ (Inf_le_Inf (λ p hp, set.subset.trans (vsub_self_mono (le_sup_right : s2 ≤ s1 ⊔ s2)) hp))
794
796
end
795
797
796
798
/-- The sup of the directions of two nonempty affine subspaces with
@@ -865,7 +867,7 @@ variables (k : Type*) {V : Type*} {P : Type*} [ring k] [add_comm_group V] [modul
865
867
variables {ι : Type *}
866
868
include V
867
869
868
- open affine_subspace
870
+ open affine_subspace set
869
871
870
872
/-- The `vector_span` is the span of the pairwise subtractions with a
871
873
given point on the left. -/
@@ -1073,8 +1075,8 @@ begin
1073
1075
rw [direction_eq_vector_span, vector_span_def],
1074
1076
exact Inf_le_Inf (λ p hp, set.subset.trans
1075
1077
(set.singleton_subset_iff.2
1076
- (vsub_mem_vsub_set (mem_span_points k p2 _ (set.mem_union_right _ hp2))
1077
- (mem_span_points k p1 _ (set.mem_union_left _ hp1))))
1078
+ (vsub_mem_vsub (mem_span_points k p2 _ (set.mem_union_right _ hp2))
1079
+ (mem_span_points k p1 _ (set.mem_union_left _ hp1))))
1078
1080
hp) }
1079
1081
end
1080
1082
0 commit comments