@@ -125,9 +125,9 @@ begin
125
125
exact false.elim (not_nonempty_iff_imp_false.1 h i)
126
126
end
127
127
128
- lemma linear_independent.ne_zero
129
- {i : ι} (ne : 0 ≠ ( 1 :R)) ( hv : linear_independent R v) : v i ≠ 0 :=
130
- λ h, ne $ eq.symm begin
128
+ lemma linear_independent.ne_zero [nontrivial R]
129
+ {i : ι} (hv : linear_independent R v) : v i ≠ 0 :=
130
+ λ h, @zero_ne_one R _ _ $ eq.symm begin
131
131
suffices : (finsupp.single i 1 : ι →₀ R) i = 0 , {simpa},
132
132
rw linear_independent_iff.1 hv (finsupp.single i 1 ),
133
133
{simp},
@@ -153,7 +153,7 @@ lemma linear_independent.unique (hv : linear_independent R v) {l₁ l₂ : ι
153
153
finsupp.total ι M R v l₁ = finsupp.total ι M R v l₂ → l₁ = l₂ :=
154
154
by apply linear_map.ker_eq_bot.1 hv
155
155
156
- lemma linear_independent.injective (zero_ne_one : ( 0 : R) ≠ 1 ) (hv : linear_independent R v) :
156
+ lemma linear_independent.injective [nontrivial R] (hv : linear_independent R v) :
157
157
injective v :=
158
158
begin
159
159
intros i j hij,
@@ -254,12 +254,13 @@ lemma linear_independent.to_subtype_range
254
254
begin
255
255
by_cases zero_eq_one : (0 : R) = 1 ,
256
256
{ apply linear_independent_of_zero_eq_one zero_eq_one },
257
+ haveI : nontrivial R := ⟨⟨0 , 1 , zero_eq_one⟩⟩,
257
258
rw linear_independent_subtype,
258
259
intros l hl₁ hl₂,
259
260
have h_bij : bij_on v (v ⁻¹' ↑l.support) ↑l.support,
260
261
{ apply bij_on.mk,
261
262
{ apply maps_to_preimage },
262
- { apply (linear_independent.injective zero_eq_one hv).inj_on },
263
+ { apply (linear_independent.injective hv).inj_on },
263
264
intros x hx,
264
265
rcases mem_range.1 (((finsupp.mem_supported _ _).1 hl₁ : ↑(l.support) ⊆ range v) hx)
265
266
with ⟨i, hi⟩,
@@ -424,12 +425,13 @@ lemma linear_independent_Union_finite {η : Type*} {ιs : η → Type*}
424
425
begin
425
426
by_cases zero_eq_one : (0 : R) = 1 ,
426
427
{ apply linear_independent_of_zero_eq_one zero_eq_one },
428
+ haveI : nontrivial R := ⟨⟨0 , 1 , zero_eq_one⟩⟩,
427
429
apply linear_independent.of_subtype_range,
428
430
{ rintros ⟨x₁, x₂⟩ ⟨y₁, y₂⟩ hxy,
429
431
by_cases h_cases : x₁ = y₁,
430
432
subst h_cases,
431
433
{ apply sigma.eq,
432
- rw linear_independent.injective zero_eq_one (hindep _) hxy,
434
+ rw linear_independent.injective (hindep _) hxy,
433
435
refl },
434
436
{ have h0 : f x₁ x₂ = 0 ,
435
437
{ apply disjoint_def.1 (hd x₁ {y₁} (finite_singleton y₁)
@@ -438,7 +440,7 @@ begin
438
440
simp only at hxy,
439
441
rw hxy,
440
442
exact (subset_span (mem_range_self y₂)) },
441
- exact false.elim ((hindep x₁).ne_zero zero_eq_one h0) } },
443
+ exact false.elim ((hindep x₁).ne_zero h0) } },
442
444
rw range_sigma_eq_Union_range,
443
445
apply linear_independent_Union_finite_subtype (λ j, (hindep j).to_subtype_range) hd,
444
446
end
534
536
535
537
end repr
536
538
537
- lemma surjective_of_linear_independent_of_span
539
+ lemma surjective_of_linear_independent_of_span [nontrivial R]
538
540
(hv : linear_independent R v) (f : ι' ↪ ι)
539
- (hss : range v ⊆ span R (range (v ∘ f))) (zero_ne_one : 0 ≠ ( 1 : R)) :
541
+ (hss : range v ⊆ span R (range (v ∘ f))) :
540
542
surjective f :=
541
543
begin
542
544
intros i,
@@ -559,12 +561,12 @@ begin
559
561
exact hi'.2
560
562
end
561
563
562
- lemma eq_of_linear_independent_of_span_subtype {s t : set M} (zero_ne_one : ( 0 : R) ≠ 1 )
564
+ lemma eq_of_linear_independent_of_span_subtype [nontrivial R] {s t : set M}
563
565
(hs : linear_independent R (λ x, x : s → M)) (h : t ⊆ s) (hst : s ⊆ span R t) : s = t :=
564
566
begin
565
567
let f : t ↪ s := ⟨λ x, ⟨x.1 , h x.2 ⟩, λ a b hab, subtype.coe_injective (subtype.mk.inj hab)⟩,
566
568
have h_surj : surjective f,
567
- { apply surjective_of_linear_independent_of_span hs f _ zero_ne_one ,
569
+ { apply surjective_of_linear_independent_of_span hs f _,
568
570
convert hst; simp [f, comp], },
569
571
show s = t,
570
572
{ apply subset.antisymm _ h,
@@ -622,13 +624,14 @@ lemma linear_independent_inl_union_inr' {v : ι → M} {v' : ι' → M'}
622
624
begin
623
625
by_cases zero_eq_one : (0 : R) = 1 ,
624
626
{ apply linear_independent_of_zero_eq_one zero_eq_one },
625
- have inj_v : injective v := (linear_independent.injective zero_eq_one hv),
626
- have inj_v' : injective v' := (linear_independent.injective zero_eq_one hv'),
627
+ haveI : nontrivial R := ⟨⟨0 , 1 , zero_eq_one⟩⟩,
628
+ have inj_v : injective v := (linear_independent.injective hv),
629
+ have inj_v' : injective v' := (linear_independent.injective hv'),
627
630
apply linear_independent.of_subtype_range,
628
631
{ apply sum.elim_injective,
629
632
{ exact inl_injective.comp inj_v },
630
633
{ exact inr_injective.comp inj_v' },
631
- { intros, simp [hv.ne_zero zero_eq_one ] } },
634
+ { intros, simp [hv.ne_zero] } },
632
635
{ rw sum.elim_range,
633
636
refine (hv.image _).to_subtype_range.union (hv'.image _).to_subtype_range _;
634
637
[simp, simp, skip],
@@ -703,21 +706,21 @@ have h4 : g a = 0, from calc
703
706
-- Now we're done; the last two facts together imply that `g` vanishes on every element of `insert a s`.
704
707
(finset.forall_mem_insert _ _ _).2 ⟨h4, h3⟩)
705
708
706
- lemma le_of_span_le_span {s t u: set M} (zero_ne_one : ( 0 : R) ≠ 1 )
709
+ lemma le_of_span_le_span [nontrivial R] {s t u: set M}
707
710
(hl : linear_independent R (coe : u → M )) (hsu : s ⊆ u) (htu : t ⊆ u)
708
711
(hst : span R s ≤ span R t) : s ⊆ t :=
709
712
begin
710
- have := eq_of_linear_independent_of_span_subtype zero_ne_one
713
+ have := eq_of_linear_independent_of_span_subtype
711
714
(hl.mono (set.union_subset hsu htu))
712
715
(set.subset_union_right _ _)
713
716
(set.union_subset (set.subset.trans subset_span hst) subset_span),
714
717
rw ← this , apply set.subset_union_left
715
718
end
716
719
717
- lemma span_le_span_iff {s t u: set M} (zero_ne_one : ( 0 : R) ≠ 1 )
720
+ lemma span_le_span_iff [nontrivial R] {s t u: set M}
718
721
(hl : linear_independent R (coe : u → M)) (hsu : s ⊆ u) (htu : t ⊆ u) :
719
722
span R s ≤ span R t ↔ s ⊆ t :=
720
- ⟨le_of_span_le_span zero_ne_one hl hsu htu, span_mono⟩
723
+ ⟨le_of_span_le_span hl hsu htu, span_mono⟩
721
724
722
725
variables (R) (v)
723
726
/-- A family of vectors is a basis if it is linearly independent and all vectors are in the span. -/
@@ -737,8 +740,8 @@ begin
737
740
{ rw[set.range_comp, range_iff_surjective.2 hf.2 , image_univ, hv.2 ] }
738
741
end
739
742
740
- lemma is_basis.injective (hv : is_basis R v) (zero_ne_one : ( 0 : R) ≠ 1 ) : injective v :=
741
- λ x y h, linear_independent.injective zero_ne_one hv.1 h
743
+ lemma is_basis.injective [nontrivial R] (hv : is_basis R v ) : injective v :=
744
+ λ x y h, linear_independent.injective hv.1 h
742
745
743
746
lemma is_basis.range (hv : is_basis R v) : is_basis R (λ x, x : range v → M) :=
744
747
⟨hv.1 .to_subtype_range, by { convert hv.2 , ext i, exact ⟨λ ⟨p, hp⟩, hp ▸ p.2 , λ hi, ⟨⟨i, hi⟩, rfl⟩⟩ }⟩
@@ -1082,7 +1085,7 @@ lemma exists_sum_is_basis (hs : linear_independent K v) :
1082
1085
begin
1083
1086
-- This is a hack: we jump through hoops to reuse `exists_subset_is_basis`.
1084
1087
let s := set.range v,
1085
- let e : ι ≃ s := equiv.set.range v ( hs.injective zero_ne_one) ,
1088
+ let e : ι ≃ s := equiv.set.range v hs.injective,
1086
1089
have : (λ x, x : s → V) = v ∘ e.symm := by { funext, dsimp, rw [equiv.set.apply_range_symm v], },
1087
1090
have : linear_independent K (λ x, x : s → V),
1088
1091
{ rw this ,
@@ -1113,7 +1116,7 @@ have ∀t, ∀(s' : finset V), ↑s' ⊆ s → s ∩ ↑t = ∅ → s ⊆ (span
1113
1116
assume t, finset.induction_on t
1114
1117
(assume s' hs' _ hss',
1115
1118
have s = ↑s',
1116
- from eq_of_linear_independent_of_span_subtype zero_ne_one hs hs' $
1119
+ from eq_of_linear_independent_of_span_subtype hs hs' $
1117
1120
by simpa using hss',
1118
1121
⟨s', by simp [this ]⟩)
1119
1122
(assume b₁ t hb₁t ih s' hs' hst hss',
0 commit comments