File: Mathlib/Combinatorics/SetFamily/CauchyDavenport.lean

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.DevosMulRel
code: /-- The relation we induct along in the proof by DeVos of the Cauchy-Davenport theorem.
`(s₁, t₁) < (s₂, t₂)` iff
* `|s₁ * t₁| < |s₂ * t₂|`
* or `|s₁ * t₁| = |s₂ * t₂|` and `|s₂| + |t₂| < |s₁| + |t₁|`
* or `|s₁ * t₁| = |s₂ * t₂|` and `|s₁| + |t₁| = |s₂| + |t₂|` and `|s₁| < |s₂|`. -/
@[to_additive
"The relation we induct along in the proof by DeVos of the Cauchy-Davenport theorem.
`(s₁, t₁) < (s₂, t₂)` iff
* `|s₁ + t₁| < |s₂ + t₂|`
* or `|s₁ + t₁| = |s₂ + t₂|` and `|s₂| + |t₂| < |s₁| + |t₁|`
* or `|s₁ + t₁| = |s₂ + t₂|` and `|s₁| + |t₁| = |s₂| + |t₂|` and `|s₁| < |s₂|`."]
private def DevosMulRel : Finset α × Finset α → Finset α × Finset α → Prop 
goal: Finset α × Finset α → Finset α × Finset α → Prop

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.DevosAddRel
code: /-- The relation we induct along in the proof by DeVos of the Cauchy-Davenport theorem.
`(s₁, t₁) < (s₂, t₂)` iff
* `|s₁ * t₁| < |s₂ * t₂|`
* or `|s₁ * t₁| = |s₂ * t₂|` and `|s₂| + |t₂| < |s₁| + |t₁|`
* or `|s₁ * t₁| = |s₂ * t₂|` and `|s₁| + |t₁| = |s₂| + |t₂|` and `|s₁| < |s₂|`. -/
@[to_additive
"The relation we induct along in the proof by DeVos of the Cauchy-Davenport theorem.
`(s₁, t₁) < (s₂, t₂)` iff
* `|s₁ + t₁| < |s₂ + t₂|`
* or `|s₁ + t₁| = |s₂ + t₂|` and `|s₂| + |t₂| < |s₁| + |t₁|`
* or `|s₁ + t₁| = |s₂ + t₂|` and `|s₁| + |t₁| = |s₂| + |t₂|` and `|s₁| < |s₂|`."]
private def DevosMulRel : Finset α × Finset α → Finset α × Finset α → Prop 
goal: Finset α × Finset α → Finset α × Finset α → Prop

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.devosMulRel_iff
code: @[to_additive]
private lemma devosMulRel_iff :
    DevosMulRel x y ↔
      (x.1 * x.2).card < (y.1 * y.2).card ∨
        (x.1 * x.2).card = (y.1 * y.2).card ∧ y.1.card + y.2.card < x.1.card + x.2.card ∨
          (x.1 * x.2).card = (y.1 * y.2).card ∧
            x.1.card + x.2.card = y.1.card + y.2.card ∧ x.1.card < y.1.card 
goal: DevosMulRel x y ↔
  (x.1 * x.2).card < (y.1 * y.2).card ∨
    (x.1 * x.2).card = (y.1 * y.2).card ∧ y.1.card + y.2.card < x.1.card + x.2.card ∨
      (x.1 * x.2).card = (y.1 * y.2).card ∧ x.1.card + x.2.card = y.1.card + y.2.card ∧ x.1.card < y.1.card

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.devosAddRel_iff
code: @[to_additive]
private lemma devosMulRel_iff :
    DevosMulRel x y ↔
      (x.1 * x.2).card < (y.1 * y.2).card ∨
        (x.1 * x.2).card = (y.1 * y.2).card ∧ y.1.card + y.2.card < x.1.card + x.2.card ∨
          (x.1 * x.2).card = (y.1 * y.2).card ∧
            x.1.card + x.2.card = y.1.card + y.2.card ∧ x.1.card < y.1.card 
goal: DevosAddRel x y ↔
  (x.1 + x.2).card < (y.1 + y.2).card ∨
    (x.1 + x.2).card = (y.1 + y.2).card ∧ y.1.card + y.2.card < x.1.card + x.2.card ∨
      (x.1 + x.2).card = (y.1 + y.2).card ∧ x.1.card + x.2.card = y.1.card + y.2.card ∧ x.1.card < y.1.card

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.devosAddRel_of_le
code: @[to_additive]
private lemma devosMulRel_of_le (mul : (x.1 * x.2).card ≤ (y.1 * y.2).card)
    (hadd : y.1.card + y.2.card < x.1.card + x.2.card) : DevosMulRel x y 
goal: DevosAddRel x y

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.devosMulRel_of_le
code: @[to_additive]
private lemma devosMulRel_of_le (mul : (x.1 * x.2).card ≤ (y.1 * y.2).card)
    (hadd : y.1.card + y.2.card < x.1.card + x.2.card) : DevosMulRel x y 
goal: DevosMulRel x y

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.devosMulRel_of_le_of_le
code: @[to_additive]
private lemma devosMulRel_of_le_of_le (mul : (x.1 * x.2).card ≤ (y.1 * y.2).card)
    (hadd : y.1.card + y.2.card ≤ x.1.card + x.2.card) (hone : x.1.card < y.1.card) :
    DevosMulRel x y 
goal: DevosMulRel x y

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.devosAddRel_of_le_of_le
code: @[to_additive]
private lemma devosMulRel_of_le_of_le (mul : (x.1 * x.2).card ≤ (y.1 * y.2).card)
    (hadd : y.1.card + y.2.card ≤ x.1.card + x.2.card) (hone : x.1.card < y.1.card) :
    DevosMulRel x y 
goal: DevosAddRel x y

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.wellFoundedOn_devosAddRel
code: @[to_additive]
private lemma wellFoundedOn_devosMulRel :
    {x : Finset α × Finset α | x.1.Nonempty ∧ x.2.Nonempty}.WellFoundedOn
      (DevosMulRel : Finset α × Finset α → Finset α × Finset α → Prop) 
goal: {x | x.1.Nonempty ∧ x.2.Nonempty}.WellFoundedOn DevosAddRel

full_name: _private.Mathlib.Combinatorics.SetFamily.CauchyDavenport.0.wellFoundedOn_devosMulRel
code: @[to_additive]
private lemma wellFoundedOn_devosMulRel :
    {x : Finset α × Finset α | x.1.Nonempty ∧ x.2.Nonempty}.WellFoundedOn
      (DevosMulRel : Finset α × Finset α → Finset α × Finset α → Prop) 
goal: {x | x.1.Nonempty ∧ x.2.Nonempty}.WellFoundedOn DevosMulRel

full_name: Finset.min_le_card_mul
code: /-- A generalisation of the **Cauchy-Davenport theorem** to arbitrary groups. The size of `s * t` is
lower-bounded by `|s| + |t| - 1` unless this quantity is greater than the size of the smallest
subgroup. -/
@[to_additive "A generalisation of the **Cauchy-Davenport theorem** to arbitrary groups. The size of
`s + t` is lower-bounded by `|s| + |t| - 1` unless this quantity is greater than the size of the
smallest subgroup."]
lemma Finset.min_le_card_mul (hs : s.Nonempty) (ht : t.Nonempty) :
    min (minOrder α) ↑(s.card + t.card - 1) ≤ (s * t).card 
goal: min (Monoid.minOrder α) ↑(s.card + t.card - 1) ≤ ↑(s * t).card

full_name: Finset.min_le_card_add
code: /-- A generalisation of the **Cauchy-Davenport theorem** to arbitrary groups. The size of `s * t` is
lower-bounded by `|s| + |t| - 1` unless this quantity is greater than the size of the smallest
subgroup. -/
@[to_additive "A generalisation of the **Cauchy-Davenport theorem** to arbitrary groups. The size of
`s + t` is lower-bounded by `|s| + |t| - 1` unless this quantity is greater than the size of the
smallest subgroup."]
lemma Finset.min_le_card_mul (hs : s.Nonempty) (ht : t.Nonempty) :
    min (minOrder α) ↑(s.card + t.card - 1) ≤ (s * t).card 
goal: min (AddMonoid.minOrder α) ↑(s.card + t.card - 1) ≤ ↑(s + t).card

full_name: AddMonoid.IsTorsionFree.card_add_card_sub_nonneg_card_add
code: /-- The **Cauchy-Davenport Theorem** for torsion-free groups. The size of `s * t` is lower-bounded
by `|s| + |t| - 1`. -/
@[to_additive "The **Cauchy-Davenport theorem** for torsion-free groups. The size of `s + t` is
lower-bounded by `|s| + |t| - 1`."]
lemma Monoid.IsTorsionFree.card_add_card_sub_one_le_card_mul (h : IsTorsionFree α)
    (hs : s.Nonempty) (ht : t.Nonempty) : s.card + t.card - 1 ≤ (s * t).card 
goal: s.card + t.card - 1 ≤ (s + t).card

full_name: Monoid.IsTorsionFree.card_add_card_sub_one_le_card_mul
code: /-- The **Cauchy-Davenport Theorem** for torsion-free groups. The size of `s * t` is lower-bounded
by `|s| + |t| - 1`. -/
@[to_additive "The **Cauchy-Davenport theorem** for torsion-free groups. The size of `s + t` is
lower-bounded by `|s| + |t| - 1`."]
lemma Monoid.IsTorsionFree.card_add_card_sub_one_le_card_mul (h : IsTorsionFree α)
    (hs : s.Nonempty) (ht : t.Nonempty) : s.card + t.card - 1 ≤ (s * t).card 
goal: s.card + t.card - 1 ≤ (s * t).card

full_name: ZMod.min_le_card_add
code: /-- The **Cauchy-Davenport Theorem**. If `s`, `t` are nonempty sets in $$ℤ/pℤ$$, then the size of
`s + t` is lower-bounded by `|s| + |t| - 1`, unless this quantity is greater than `p`. -/
lemma ZMod.min_le_card_add {p : ℕ} (hp : p.Prime) {s t : Finset (ZMod p)} (hs : s.Nonempty)
    (ht : t.Nonempty) : min p (s.card + t.card - 1) ≤ (s + t).card 
goal: min p (s.card + t.card - 1) ≤ (s + t).card

full_name: Finset.card_add_card_sub_nonneg_card_add
code: /-- The **Cauchy-Davenport Theorem** for linearly ordered cancellative semigroups. The size of
`s * t` is lower-bounded by `|s| + |t| - 1`. -/
@[to_additive
"The **Cauchy-Davenport theorem** for linearly ordered additive cancellative semigroups. The size of
`s + t` is lower-bounded by `|s| + |t| - 1`."]
lemma Finset.card_add_card_sub_one_le_card_mul [LinearOrder α] [Semigroup α] [IsCancelMul α]
    [CovariantClass α α (· * ·) (· ≤ ·)] [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    {s t : Finset α} (hs : s.Nonempty) (ht : t.Nonempty) : s.card + t.card - 1 ≤ (s * t).card 
goal: s.card + t.card - 1 ≤ (s + t).card

full_name: Finset.card_add_card_sub_one_le_card_mul
code: /-- The **Cauchy-Davenport Theorem** for linearly ordered cancellative semigroups. The size of
`s * t` is lower-bounded by `|s| + |t| - 1`. -/
@[to_additive
"The **Cauchy-Davenport theorem** for linearly ordered additive cancellative semigroups. The size of
`s + t` is lower-bounded by `|s| + |t| - 1`."]
lemma Finset.card_add_card_sub_one_le_card_mul [LinearOrder α] [Semigroup α] [IsCancelMul α]
    [CovariantClass α α (· * ·) (· ≤ ·)] [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    {s t : Finset α} (hs : s.Nonempty) (ht : t.Nonempty) : s.card + t.card - 1 ≤ (s * t).card 
goal: s.card + t.card - 1 ≤ (s * t).card