@@ -34,11 +34,9 @@ The result is also used in `Topology.Instances.Real` as an ingredient in the cla
3434subgroups of `ℝ`.
3535-/
3636
37-
37+ open Set
3838variable {G : Type _} [LinearOrderedAddCommGroup G] [Archimedean G]
3939
40- open LinearOrderedAddCommGroup
41-
4240/-- Given a subgroup `H` of a decidable linearly ordered archimedean abelian group `G`, if there
4341exists a minimal element `a` of `H ∩ G_{>0}` then `H` is generated by `a`. -/
4442theorem AddSubgroup.cyclic_of_min {H : AddSubgroup G} {a : G}
@@ -58,21 +56,49 @@ theorem AddSubgroup.cyclic_of_min {H : AddSubgroup G} {a : G}
5856 simp [sub_eq_zero.mp h_zero, AddSubgroup.mem_closure_singleton]
5957#align add_subgroup.cyclic_of_min AddSubgroup.cyclic_of_min
6058
59+ /-- If a nontrivial additive subgroup of a linear ordered additive commutative group is disjoint
60+ with the interval `Set.Ioo 0 a` for some positive `a`, then the set of positive elements of this
61+ group admits the least element. -/
62+ theorem AddSubgroup.exists_isLeast_pos {H : AddSubgroup G} (hbot : H ≠ ⊥) {a : G} (h₀ : 0 < a)
63+ (hd : Disjoint (H : Set G) (Ioo 0 a)) : ∃ b, IsLeast { g : G | g ∈ H ∧ 0 < g } b := by
64+ -- todo: move to a lemma?
65+ have hex : ∀ g > 0 , ∃ n : ℕ, g ∈ Ioc (n • a) ((n + 1 ) • a) := fun g hg => by
66+ rcases existsUnique_add_zsmul_mem_Ico h₀ 0 (g - a) with ⟨m, ⟨hm, hm'⟩, -⟩
67+ simp only [zero_add, sub_le_iff_le_add, sub_add_cancel, ← add_one_zsmul] at hm hm'
68+ lift m to ℕ
69+ · rw [← Int.lt_add_one_iff, ← zsmul_lt_zsmul_iff h₀, zero_zsmul]
70+ exact hg.trans_le hm
71+ · simp only [← Nat.cast_succ, coe_nat_zsmul] at hm hm'
72+ exact ⟨m, hm', hm⟩
73+ have : ∃ n : ℕ, Set.Nonempty (H ∩ Ioc (n • a) ((n + 1 ) • a))
74+ · rcases (bot_or_exists_ne_zero H).resolve_left hbot with ⟨g, hgH, hg₀⟩
75+ rcases hex (|g|) (abs_pos.2 hg₀) with ⟨n, hn⟩
76+ exact ⟨n, _, (@abs_mem_iff (AddSubgroup G) G _ _).2 hgH, hn⟩
77+ classical rcases Nat.findX this with ⟨n, ⟨x, hxH, hnx, hxn⟩, hmin⟩
78+ by_contra hxmin
79+ simp only [IsLeast, not_and, mem_setOf_eq, mem_lowerBounds, not_exists, not_forall,
80+ not_le] at hxmin
81+ rcases hxmin x ⟨hxH, (nsmul_nonneg h₀.le _).trans_lt hnx⟩ with ⟨y, ⟨hyH, hy₀⟩, hxy⟩
82+ rcases hex y hy₀ with ⟨m, hm⟩
83+ cases' lt_or_le m n with hmn hnm
84+ · exact hmin m hmn ⟨y, hyH, hm⟩
85+ · refine disjoint_left.1 hd (sub_mem hxH hyH) ⟨sub_pos.2 hxy, sub_lt_iff_lt_add'.2 ?_⟩
86+ calc x ≤ (n + 1 ) • a := hxn
87+ _ ≤ (m + 1 ) • a := nsmul_le_nsmul h₀.le (add_le_add_right hnm _)
88+ _ = m • a + a := succ_nsmul' _ _
89+ _ < y + a := add_lt_add_right hm.1 _
90+
91+ /-- If an additive subgroup of a linear ordered additive commutative group is disjoint with the
92+ interval `Set.Ioo 0 a` for some positive `a`, then this is a cyclic subgroup. -/
93+ theorem AddSubgroup.cyclic_of_isolated_zero {H : AddSubgroup G} {a : G} (h₀ : 0 < a)
94+ (hd : Disjoint (H : Set G) (Ioo 0 a)) : ∃ b, H = closure {b} := by
95+ rcases eq_or_ne H ⊥ with rfl | hbot
96+ · exact ⟨0 , closure_singleton_zero.symm⟩
97+ · exact (exists_isLeast_pos hbot h₀ hd).imp fun _ => cyclic_of_min
98+
6199/-- Every subgroup of `ℤ` is cyclic. -/
62- theorem Int.subgroup_cyclic (H : AddSubgroup ℤ) : ∃ a, H = AddSubgroup.closure {a} := by
63- cases' AddSubgroup.bot_or_exists_ne_zero H with h h
64- · use 0
65- rw [h]
66- exact AddSubgroup.closure_singleton_zero.symm
67- let s := { g : ℤ | g ∈ H ∧ 0 < g }
68- have h_bdd : ∀ g ∈ s, (0 : ℤ) ≤ g := fun _ h => le_of_lt h.2
69- obtain ⟨g₀, g₀_in, g₀_ne⟩ := h
70- obtain ⟨g₁, g₁_in, g₁_pos⟩ : ∃ g₁ : ℤ, g₁ ∈ H ∧ 0 < g₁ :=
71- by
72- cases' lt_or_gt_of_ne g₀_ne with Hg₀ Hg₀
73- · exact ⟨-g₀, H.neg_mem g₀_in, neg_pos.mpr Hg₀⟩
74- · exact ⟨g₀, g₀_in, Hg₀⟩
75- classical
76- obtain ⟨a, ha, ha'⟩ := Int.exists_least_of_bdd ⟨(0 : ℤ), h_bdd⟩ ⟨g₁, g₁_in, g₁_pos⟩
77- exact ⟨a, AddSubgroup.cyclic_of_min ⟨ha, ha'⟩⟩
100+ theorem Int.subgroup_cyclic (H : AddSubgroup ℤ) : ∃ a, H = AddSubgroup.closure {a} :=
101+ have : Ioo (0 : ℤ) 1 = ∅ := eq_empty_of_forall_not_mem fun m hm =>
102+ hm.1 .not_le (lt_add_one_iff.1 hm.2 )
103+ AddSubgroup.cyclic_of_isolated_zero one_pos <| by simp [this]
78104#align int.subgroup_cyclic Int.subgroup_cyclic
0 commit comments