File: Mathlib/Algebra/GCDMonoid/Finset.lean

full_name: Finset.lcm
code: /-- Least common multiple of a finite set -/
def lcm (s : Finset β) (f : β → α) : α 
goal: α

full_name: Finset.lcm_def
code: theorem lcm_def : s.lcm f = (s.1.map f).lcm 
goal: s.lcm f = (Multiset.map f s.val).lcm

full_name: Finset.lcm_empty
code: @[simp]
theorem lcm_empty : (∅ : Finset β).lcm f = 1 
goal: ∅.lcm f = 1

full_name: Finset.lcm_dvd_iff
code: @[simp]
theorem lcm_dvd_iff {a : α} : s.lcm f ∣ a ↔ ∀ b ∈ s, f b ∣ a 
goal: s.lcm f ∣ a ↔ ∀ b ∈ s, f b ∣ a

full_name: Finset.lcm_dvd
code: theorem lcm_dvd {a : α} : (∀ b ∈ s, f b ∣ a) → s.lcm f ∣ a 
goal: (∀ b ∈ s, f b ∣ a) → s.lcm f ∣ a

full_name: Finset.dvd_lcm
code: theorem dvd_lcm {b : β} (hb : b ∈ s) : f b ∣ s.lcm f 
goal: f b ∣ s.lcm f

full_name: Finset.lcm_insert
code: @[simp]
theorem lcm_insert [DecidableEq β] {b : β} :
    (insert b s : Finset β).lcm f = GCDMonoid.lcm (f b) (s.lcm f) 
goal: (insert b s).lcm f = lcm (f b) (s.lcm f)

full_name: Finset.lcm_singleton
code: @[simp]
theorem lcm_singleton {b : β} : ({b} : Finset β).lcm f = normalize (f b) 
goal: {b}.lcm f = normalize (f b)

full_name: Finset.normalize_lcm
code: @[simp 1100]
theorem normalize_lcm : normalize (s.lcm f) = s.lcm f 
goal: normalize (s.lcm f) = s.lcm f

full_name: Finset.lcm_union
code: theorem lcm_union [DecidableEq β] : (s₁ ∪ s₂).lcm f = GCDMonoid.lcm (s₁.lcm f) (s₂.lcm f) 
goal: (s₁ ∪ s₂).lcm f = lcm (s₁.lcm f) (s₂.lcm f)

full_name: Finset.lcm_congr
code: theorem lcm_congr {f g : β → α} (hs : s₁ = s₂) (hfg : ∀ a ∈ s₂, f a = g a) :
    s₁.lcm f = s₂.lcm g 
goal: s₁.lcm f = s₂.lcm g

full_name: Finset.lcm_mono_fun
code: theorem lcm_mono_fun {g : β → α} (h : ∀ b ∈ s, f b ∣ g b) : s.lcm f ∣ s.lcm g 
goal: s.lcm f ∣ s.lcm g

full_name: Finset.lcm_mono
code: theorem lcm_mono (h : s₁ ⊆ s₂) : s₁.lcm f ∣ s₂.lcm f 
goal: s₁.lcm f ∣ s₂.lcm f

full_name: Finset.lcm_image
code: theorem lcm_image [DecidableEq β] {g : γ → β} (s : Finset γ) :
    (s.image g).lcm f = s.lcm (f ∘ g) 
goal: (Finset.image g s).lcm f = s.lcm (f ∘ g)

full_name: Finset.lcm_eq_lcm_image
code: theorem lcm_eq_lcm_image [DecidableEq α] : s.lcm f = (s.image f).lcm id 
goal: s.lcm f = (Finset.image f s).lcm id

full_name: Finset.lcm_eq_zero_iff
code: theorem lcm_eq_zero_iff [Nontrivial α] : s.lcm f = 0 ↔ 0 ∈ f '' s 
goal: s.lcm f = 0 ↔ 0 ∈ f '' ↑s

full_name: Finset.gcd
code: /-- Greatest common divisor of a finite set -/
def gcd (s : Finset β) (f : β → α) : α 
goal: α

full_name: Finset.gcd_def
code: theorem gcd_def : s.gcd f = (s.1.map f).gcd 
goal: s.gcd f = (Multiset.map f s.val).gcd

full_name: Finset.gcd_empty
code: @[simp]
theorem gcd_empty : (∅ : Finset β).gcd f = 0 
goal: ∅.gcd f = 0

full_name: Finset.dvd_gcd_iff
code: theorem dvd_gcd_iff {a : α} : a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b 
goal: a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b

full_name: Finset.gcd_dvd
code: theorem gcd_dvd {b : β} (hb : b ∈ s) : s.gcd f ∣ f b 
goal: s.gcd f ∣ f b

full_name: Finset.dvd_gcd
code: theorem dvd_gcd {a : α} : (∀ b ∈ s, a ∣ f b) → a ∣ s.gcd f 
goal: (∀ b ∈ s, a ∣ f b) → a ∣ s.gcd f

full_name: Finset.gcd_insert
code: @[simp]
theorem gcd_insert [DecidableEq β] {b : β} :
    (insert b s : Finset β).gcd f = GCDMonoid.gcd (f b) (s.gcd f) 
goal: (insert b s).gcd f = gcd (f b) (s.gcd f)

full_name: Finset.gcd_singleton
code: @[simp]
theorem gcd_singleton {b : β} : ({b} : Finset β).gcd f = normalize (f b) 
goal: {b}.gcd f = normalize (f b)

full_name: Finset.normalize_gcd
code: @[simp 1100]
theorem normalize_gcd : normalize (s.gcd f) = s.gcd f 
goal: normalize (s.gcd f) = s.gcd f

full_name: Finset.gcd_union
code: theorem gcd_union [DecidableEq β] : (s₁ ∪ s₂).gcd f = GCDMonoid.gcd (s₁.gcd f) (s₂.gcd f) 
goal: (s₁ ∪ s₂).gcd f = gcd (s₁.gcd f) (s₂.gcd f)

full_name: Finset.gcd_congr
code: theorem gcd_congr {f g : β → α} (hs : s₁ = s₂) (hfg : ∀ a ∈ s₂, f a = g a) :
    s₁.gcd f = s₂.gcd g 
goal: s₁.gcd f = s₂.gcd g

full_name: Finset.gcd_mono_fun
code: theorem gcd_mono_fun {g : β → α} (h : ∀ b ∈ s, f b ∣ g b) : s.gcd f ∣ s.gcd g 
goal: s.gcd f ∣ s.gcd g

full_name: Finset.gcd_mono
code: theorem gcd_mono (h : s₁ ⊆ s₂) : s₂.gcd f ∣ s₁.gcd f 
goal: s₂.gcd f ∣ s₁.gcd f

full_name: Finset.gcd_image
code: theorem gcd_image [DecidableEq β] {g : γ → β} (s : Finset γ) :
    (s.image g).gcd f = s.gcd (f ∘ g) 
goal: (Finset.image g s).gcd f = s.gcd (f ∘ g)

full_name: Finset.gcd_eq_gcd_image
code: theorem gcd_eq_gcd_image [DecidableEq α] : s.gcd f = (s.image f).gcd id 
goal: s.gcd f = (Finset.image f s).gcd id

full_name: Finset.gcd_eq_zero_iff
code: theorem gcd_eq_zero_iff : s.gcd f = 0 ↔ ∀ x : β, x ∈ s → f x = 0 
goal: s.gcd f = 0 ↔ ∀ x ∈ s, f x = 0

full_name: Finset.gcd_eq_gcd_filter_ne_zero
code: theorem gcd_eq_gcd_filter_ne_zero [DecidablePred fun x : β ↦ f x = 0] :
    s.gcd f = (s.filter fun x ↦ f x ≠ 0).gcd f 
goal: s.gcd f = (Finset.filter (fun x => f x ≠ 0) s).gcd f

full_name: Finset.gcd_mul_left
code: nonrec theorem gcd_mul_left {a : α} : (s.gcd fun x ↦ a * f x) = normalize a * s.gcd f 
goal: (s.gcd fun x => a * f x) = normalize a * s.gcd f

full_name: Finset.gcd_mul_right
code: nonrec theorem gcd_mul_right {a : α} : (s.gcd fun x ↦ f x * a) = s.gcd f * normalize a 
goal: (s.gcd fun x => f x * a) = s.gcd f * normalize a

full_name: Finset.extract_gcd'
code: theorem extract_gcd' (f g : β → α) (hs : ∃ x, x ∈ s ∧ f x ≠ 0)
    (hg : ∀ b ∈ s, f b = s.gcd f * g b) : s.gcd g = 1 
goal: s.gcd g = 1

full_name: Finset.extract_gcd
code: theorem extract_gcd (f : β → α) (hs : s.Nonempty) :
    ∃ g : β → α, (∀ b ∈ s, f b = s.gcd f * g b) ∧ s.gcd g = 1 
goal: ∃ g, (∀ b ∈ s, f b = s.gcd f * g b) ∧ s.gcd g = 1

full_name: Finset.gcd_div_eq_one
code: /-- Given a nonempty Finset `s` and a function `f` from `s` to `ℕ`, if `d = s.gcd`,
then the `gcd` of `(f i) / d` is equal to `1`. -/
lemma gcd_div_eq_one (his : i ∈ s) (hfi : f i ≠ 0) : s.gcd (fun j ↦ f j / s.gcd f) = 1 
goal: (s.gcd fun j => f j / s.gcd f) = 1

full_name: Finset.gcd_div_id_eq_one
code: lemma gcd_div_id_eq_one {s : Finset α} {a : α} (has : a ∈ s) (ha : a ≠ 0) :
    s.gcd (fun b ↦ b / s.gcd id) = 1 
goal: (s.gcd fun b => b / s.gcd id) = 1

full_name: Finset.gcd_eq_of_dvd_sub
code: theorem gcd_eq_of_dvd_sub {s : Finset β} {f g : β → α} {a : α}
    (h : ∀ x : β, x ∈ s → a ∣ f x - g x) :
    GCDMonoid.gcd a (s.gcd f) = GCDMonoid.gcd a (s.gcd g) 
goal: gcd a (s.gcd f) = gcd a (s.gcd g)