@@ -463,23 +463,53 @@ end
463
463
section rank_zero
464
464
465
465
variables {R : Type u} {M : Type v}
466
- variables [ring R] [nontrivial R] [add_comm_group M] [module R M] [no_zero_smul_divisors R M]
466
+ variables [ring R] [add_comm_group M] [module R M]
467
+
468
+ @[simp] lemma dim_subsingleton [subsingleton R] : module.rank R M = 1 :=
469
+ begin
470
+ haveI := module.subsingleton R M,
471
+ haveI : nonempty {s : set M // linear_independent R (coe : s → M)},
472
+ { exact ⟨⟨∅, linear_independent_empty _ _⟩⟩ },
473
+ rw [module.rank, csupr_eq_of_forall_le_of_forall_lt_exists_gt],
474
+ { rintros ⟨s, hs⟩,
475
+ rw cardinal.mk_le_one_iff_set_subsingleton,
476
+ apply subsingleton_of_subsingleton },
477
+ intros w hw,
478
+ refine ⟨⟨{0 }, _⟩, _⟩,
479
+ { rw linear_independent_iff',
480
+ intros,
481
+ exact subsingleton.elim _ _ },
482
+ { exact hw.trans_eq (cardinal.mk_singleton _).symm },
483
+ end
484
+
485
+ variables [no_zero_smul_divisors R M]
486
+
487
+ lemma dim_pos [nontrivial M] : 0 < module.rank R M :=
488
+ begin
489
+ obtain ⟨x, hx⟩ := exists_ne (0 : M),
490
+ suffices : 1 ≤ module.rank R M,
491
+ { exact zero_lt_one.trans_le this },
492
+ letI := module.nontrivial R M,
493
+ suffices : linear_independent R (λ (y : ({x} : set M)), ↑y),
494
+ { simpa using (cardinal_le_dim_of_linear_independent this ), },
495
+ exact linear_independent_singleton hx
496
+ end
497
+
498
+ variables [nontrivial R]
467
499
468
500
lemma dim_zero_iff_forall_zero : module.rank R M = 0 ↔ ∀ x : M, x = 0 :=
469
501
begin
470
502
refine ⟨λ h, _, λ h, _⟩,
471
503
{ contrapose! h,
472
504
obtain ⟨x, hx⟩ := h,
473
- suffices : 1 ≤ module.rank R M,
474
- { intro h, exact this.not_lt (h.symm ▸ zero_lt_one) },
475
- suffices : linear_independent R (λ (y : ({x} : set M)), ↑y),
476
- { simpa using (cardinal_le_dim_of_linear_independent this ), },
477
- exact linear_independent_singleton hx },
505
+ letI : nontrivial M := nontrivial_of_ne _ _ hx,
506
+ exact dim_pos.ne' },
478
507
{ have : (⊤ : submodule R M) = ⊥,
479
508
{ ext x, simp [h x] },
480
509
rw [←dim_top, this , dim_bot] }
481
510
end
482
511
512
+ /-- See `dim_subsingleton` for the reason that `nontrivial R` is needed. -/
483
513
lemma dim_zero_iff : module.rank R M = 0 ↔ subsingleton M :=
484
514
dim_zero_iff_forall_zero.trans (subsingleton_iff_forall_eq 0 ).symm
485
515
492
522
lemma dim_pos_iff_nontrivial : 0 < module.rank R M ↔ nontrivial M :=
493
523
dim_pos_iff_exists_ne_zero.trans (nontrivial_iff_exists_ne 0 ).symm
494
524
495
- lemma dim_pos [h : nontrivial M] : 0 < module.rank R M :=
496
- dim_pos_iff_nontrivial.2 h
497
-
498
525
end rank_zero
499
526
500
527
section invariant_basis_number
0 commit comments