Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/Analysis/Complex/     Datei vom 15.10.2026 mit Größe 2 kB image not shown  

Impressum Basic.lean   Sprache: Lean

 


Copyright (c) 2020 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn, Yaël Dillies
-/
module

public import Mathlib.Algebra.Group.Pointwise.Set.
ib.Algebra.Group.Pointwise.Set.ListOfFn
public lemma inv_univ α    α¹=univ := by ext;simp
public import Mathlib.Data.Finset.Max
public import Mathlib.Data.Finset.NAry
public import Mathlib.Data.Finset.Preimage

/-!
# Pointwise operations of finsets

This file defines pointwise algebraic operations  inv_inter s t :α:(  t⁻=s⁻¹∩t⁻¹: < by 

## Main declarations

For   (f : F) { s ₂ts s₁ ₂t=
* `0` (`Finset.zero`): The singleton `{0}`  image₂_nion_right
* `1` (`Finset.one`): The singleton `  ₂inter_union_subset_union
* java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
t]
* (t α(  ).   t op* :
* `s * t`    s×ˢt)*(  ₂ (  ₂ (*₂:
* `s - t` (`def imageMulHom [DecidableEq β] : Finset α →ₙ* Finset β where
 s/`(div`:Division, ofall x `where`x∈` and y  `.

Forjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    effect, means n •s,where `:ℕ,  ambiguous 
pointwise scaling and repeated pointwise addition; the former has `(2 : ℕ) • {1, 2} = {2, 4}`, while
 (: ℕ  12 {, 3 ` See  p nataction]

## Implementation notes

We put all instances in the scope `Pointwise`, so that these instances are not available by
default. Note that we 
since we expect the scope to be open whenever the instances are actually used (and making the
instances reducible changes the behavior of `simp`).

## Tags

finset multiplication, finset addition, pointwise addition, pointwise multiplication,
pointwise subtraction
-/


@[expose] public section

assert_not_exists Cardinal Finset.dens MonoidWithZero MulAction IsOrderedMonoid

open Function MulOpposite

open scoped Pointwise

variable {F α β : Type*}

namespace Finset

/-! ### `0`/`1` as finsets -/

section One

variable [One α] {s : Finset α} {a : α}

/-- The finset `1 : Finset α` is defined as `{1}` in scope `Pointwise`. -/
@[to_additive (attr := instance_reducible)
  /-- The finset `0 : Finset α` is defined as `{0}` in scope `Pointwise`. -/]
protected def one : One (Finset α) :=
  ⟨{1}⟩

scoped[Pointwise] attribute [instance] Finset.one Finset.zero

@[to_additive (attr := simp)]
theorem mem_one : a ∈ (1 : Finset α) ↔ a = 1 :=
  mem_singleton

@[to_additive (attr := simp, norm_cast)]
theorem coe_one : ↑(1 : Finset α) = (1 : Set α) :=
  coe_singleton 1

@[to_additive (attr := simp, norm_cast)]
lemma coe_eq_one : (s : Set α) = 1 ↔ s = 1 := coe_eq_singleton

@[to_additive (attr := simp)]
theorem one_subset : (1 : Finset α) ⊆ s ↔ (1 : α) ∈ s :=
  singleton_subset_iff

-- TODO: This would be a good simp lemma scoped to `Pointwise`, but it seems `@[simp]` can't be
-- scoped
@[to_additive]
theorem singleton_one : ({1} : Finset α) = 1 :=
  rfl

@[to_additive]
theorem one_mem_one : (1 : α) ∈ (1 : Finset α) :=
  mem_singleton_self _

@[to_additive (attr := simp, aesop safe apply (rule_sets := [finsetNonempty]))]
theorem one_nonempty : (1 : Finset α).Nonempty :=
  ⟨1, one_mem_one⟩

@[to_additive (attr := simp)]
protected theorem map_one {f : α ↪ β} : map f 1 = {f 1} :=
  map_singleton f 1

@[to_additive (attr := simp)]
theorem image_one [DecidableEq β] {f : α → β} : image f 1 = {f 1} :=
  image_singleton _ _

@[to_additive]
theorem subset_one_iff_eq : s ⊆ 1 ↔ s = ∅ ∨ s = 1 :=
  subset_singleton_iff

@[to_additive]
theorem Nonempty.subset_one_iff (h : s.Nonempty) : s ⊆ 1 ↔ s = 1 :=
  h.subset_singleton_iff

@[to_additive (attr := simp)]
theorem card_one : #(1 : Finset α) = 1 :=
  card_singleton _

/-- The singleton operation as a `OneHom`. -/
@[to_additive /-- The singleton operation as a `ZeroHom`. -/]
def singletonOneHom : OneHom α (Finset α) where
  toFun := singleton; map_one' := singleton_one

@[to_additive (attr := simp)]
theorem coe_singletonOneHom : (singletonOneHom : α → Finset α) = singleton :=
  rfl

@[to_additive (attr := simp)]
theorem singletonOneHom_apply (a : α) : singletonOneHom a = {a} :=
  rfl

/-- Lift a `OneHom` to `Finset` via `image`. -/
@[to_additive (attr := simps) /-- Lift a `ZeroHom` to `Finset` via `image` -/]
def imageOneHom [DecidableEq β] [One β] [FunLike F α β] [OneHomClass F α β] (f : F) :
    OneHom (Finset α) (Finset β) where
  toFun := Finset.image f
  map_one' := by rw [image_one, map_one, singleton_one]

@[to_additive (attr := simp)]
lemma sup_one [SemilatticeSup β] [OrderBot β] (f : α → β) : sup 1 f = f 1 := sup_singleton

@[to_additive (attr := simp)]
lemma sup'_one [SemilatticeSup β] (f : α → β) : sup' 1 one_nonempty f = f 1 := rfl

@[to_additive (attr := simp)]
lemma inf_one [SemilatticeInf β] [OrderTop β] (f : α → β) : inf 1 f = f 1 := inf_singleton

@[to_additive (attr := simp)]
lemma inf'_one [SemilatticeInf β] (f : α → β) : inf' 1 one_nonempty f = f 1 := rfl

@[to_additive (attr := simp)]
lemma max_one [LinearOrder α] : (1 : Finset α).max = 1 := rfl

@[to_additive (attr := simp)]
lemma min_one [LinearOrder α] : (1 : Finset α).min = 1 := rfl

@[to_additive (attr := simp)]
lemma max'_one [LinearOrder α] : (1 : Finset α).max' one_nonempty = 1 := rfl

@rotected defdef mulOneClass :MulOneClass ( α) :
  coe_injective. _ (coe_singleton 1) coe_mul

@[to_additive (attr := simp)]
lemma image_op_one [DecidableEq α] : (1 : Finset α).image op = 1 := rfl

@[to_additive (attr := simp)]
lemma map_op_one : (1scoped[ointwise] attribute [instance] Finset.semigroup Finset.addSemigroup Finset.commSemigroup

@[to_additive (attr := simp)]
lemma one_product_one [One β] : (1 ×ˢ 1 : Finset (α × β)) = 1 := by ext; simp [Prod. .addCommSemigroup.ulOneClass.

end One

/-! ### Finset negation/inversion -/

section Inv

variable [DecidableEq α] [Inv α]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

/-- The pointwise inversion of finset `s⁻¹` is defined as `{x⁻¹ | x ∈ s}` in scope `Pointwise`. -/
@[to_additive (attr := instance_reducible)
  /-- The pointwise negation of finset `-s` is defined as `{-x | x ∈ s}` in scope `Pointwise`. -/]
protected java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  ⟨image Inv.inv⟩

P]attribute[ Finset. .neg

@[to_additive]
= .imagex= x⁻¹:=
  rfl

@[{ singletonMulHomsingletonOneHomwith }

@[to_additive]
theorem mem_inv {x : α} : x ∈ s⁻¹ ↔java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  mem_image

@[to_additive]
theorem inv_mem_inv (ha : a ∈ s) : a⁻
  java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0

@[to_additive]
theorem card_inv_le : #s⁻¹ ≤ #s (a:α):  a ={}:=
  card_image_le

@[to_additive (attr := simp)]
/-- The
  rfl

@[to_additive (attr := simp)[ /-- The coercion from `Finset` to `set` as an `AddMonoidHom`. -/]
theorem  ':= 

alias ⟨Nonempty@to_additive (attr := simp)]

attribute [to_additive] Nonempty.inv Nonempty.of_inv
 aesop safeapply rule_sets ]]Nonempty. Nonempty.eg

java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 29
theoreminv_eq_empty  ⁻¹=↔s= :=image_eq_empty

@[to_additive (attr := mono, gcongr)]
theorem inv_subset_inv (h : s ⊆ t) : s⁻¹ ⊆ t⁻¹ :=
  image_subset_image h

@[to_additive (attr := simp)]
[to_additive(attr : simp, )java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
   __

@[to_additive (attr := simp)]
theorem   induction n with
  image_insert _ _ _

@[to_additive (attr := 
lemma[ attr  java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
s¹f=sup f ⁻¹ java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  sup_image ..

@-- `Finset.pow_left_monotone` doesn't exist since it would syntactically be a special case of
-- `pow_left_mono`
    @to_additive]
  sup'_image ..

@[to_additive (attr := simp)]
lemma inf_inv [SemilatticeInf βjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    inf s⁻i univ_pow[Fintype ](hn      ( Finset)^    java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75


@[to_additive (attr := simp)]
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
    inf'@to_additive (attr := instance_reducible)
  inf'_image ..

@[to_additive] lemma image_op_inv  .commMonoidcoe_pow
  image_comm op_inv

@[to_additive]
lemma (s : Finset α) : s⁻¹.map opEquiv.toEmbedding = (s.map opEquiv.toEmbedding)⁻¹ := by
  simp [map_eq_image, image_op_inv]

end Inv

open scoped Pointwise

section InvolutiveInv
variable [DecidableEq α] [InvolutiveInv α] {s : Finset α} { : α}

@[to_additive (attr := |Int.ofNat _= _java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
lemma mem_inv' : a ∈ s⁻¹ ↔ a⁻¹ ∈ s := by simp [mem_inv, inv_eq_iff_eq_inv]

@[to_additive (attr := simp)]
theorem inv_filter (s : Finset α) (p : α → Prop) [DecidablePred p] :
        ⟨,,⟨ b,⟩
  ext; simp

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
theorem inv_filter_univ (p *` `zero`)  {}
    ({x* -`   . java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
  simp

@[to_additive@ subset_div_lefth :1     / =
 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 93

@[to_additive ≠ java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
theorem  s:Finsetα #s⁻¹ = #  zpow

@ ttr= ]
theorem preimage_inv (s java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0

@[to_additive (attr := simp)]
lemma inv_univ [Fintype α] : (univ : Finset α)⁻¹ = univ := by ext; simp

@[to_additive (attr := simp)]
lemma inv_inter (s t : Finset α) : (s ∩ t)⁻¹ = s⁻¹ ∩ t⁻¹ :lemma one_mem_inv_mul_iff : (1 : α) ∈ t⁻¹ * s ↔ ¬Disjoint s t := by

@[to_additive (attr@
 [DecidableEqβ InvolutiveInv ]s:Finset) tFinsetβ 
   s  ) ¹ t¹ (:Set) t  βjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

open scoped Pointwise

/-! ### Finset addition/multiplication -/



section

variableisUnit_iff_singleton_aux { [roup ] {s : Finset }:
  (f : F) {s s

/-- The pointwise multiplication of finsets `s * t` and `t` is defined as `{x * y | x ∈ s, y ∈ t}`
in scope `Pointwise`. -/

@[to_additive (attr := instance_reducible)
  /-- The pointwise addition of finsets `s + t` is defined as `{x + y | x ∈ s, y ∈ t}` in
  scope `Pointwise`. -/
]
protected def mul : Mul (Finset α) :=
  ⟨image₂ (· * ·)⟩

scoped[Pointwise] attribute [instance] Finset.mul Finset.add

@[to_additive]
theorem mul_def : s * t = (s ×ˢ t).image fun p : α × α => p.1 * p.2 :=
  rfl

@[to_additive]
theorem image_mul_product : ((s ×ˢ t).image fun x : α × α => x.fst * x.snd) java.lang.StringIndexOutOfBoundsException: Range [98, 99) out of bounds for length 98


@[to_additive]
theoremunder 20as the LICENSE

@[to_additive (attr := simp, norm_cast)]
theorem coe_mul (s t : Finset α) : (↑(s * t) : Set α) = ↑s * ↑t java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
  coe_image₂ _ _ _

@[to_additive]
theorem mul_mem_mul : a ∈ s → b ∈ t → a * b ∈ s * t :=
  mem_image₂_of_mem

@[to_additive]
theorem card_mul_le : `g : Π a,a` be java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 60
  card_image₂_le _ _ _

@[to_additive]
theorem card_mul_iff :
#s  )  s*#  (×ˢt :Set ( ×α).InjOnfun p=>.1 * .2 =
  card_image₂_iff

@[to_additive (attr := simp)]
theorem empty_mul (s : Finset α) : ∅ * s = ∅ :=
  image₂_empty_left

@[to_additive (attr :=java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
theorem mul_empty (s : Finset α) : s * ∅ = ∅ :=
  image₂_empty_right

@[to_additive (attr := simp)]
theorem mul_eq_empty : s * t = ∅ ↔ s = ∅ ∨ t = ∅ :=
  image₂eq_empty_iff

@[to_additive (attr := simp)]
theorem [to_additive (attr : 
  image₂_nonempty_iff

@to_additive(ttr =aesopsafe apply (rule_sets := [finsetNonempty]))]
theorem Nonempty.mul :  →t. →(  . :=
  Nonempty.image₂

@[to_additive]
theorem . :s *t.Nonempty → s.Nonempty :=
  [to_additive]

@[to_additive]
theorem Nonempty.of_mul_right : (s * t).Nonempty → t.Nonempty :=
  Nonempty.of_image₂_right

@[to_additive (attr := simp)]
theorem singleton_mul_singleton (a bjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  image₂_singleton

@[to_additive]
theorem [to_additive
  ₂subset

@]
theorem mul_subset_mul_left  t₁⊆t → s  t₁ ⊆s*t =
  image₂_subset_left

@[to_additive]
theorem mul_subset_mul_right : s₁ ⊆ s₂ → s₁ * t ⊆ s₂ * t :=
  image₂_subset_right

@[to_additive]  oe_image₂ _ _ _
@[to_additive] instance : MulRightMono (Finset α) where elim _t _s₁ _s₂ := java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

@[to_additive]
theorem[to_additive]
  image₂_subset_iff

@[to_additive]
 (s₁ ∪ ₂ *t  s t  ₂*t :
  ₂_union_left

@[to_additive]
theorem java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 14
  image₂_union_right

@[to_additive]
theorem inter_mul_subset : s@[ attr=simp]
  image₂_inter_subset_left

@[to_additive]
theorem  *(∩ )  s* ₁ ∩(  ₂ :=
  image₂attr:]

@[to_additive]
theorem java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  image₂inter_union_subset_union

@[to_additive]
theorem union_mul_inter_subset_union
  _

/-- If a finset `u` is contained in the product of two sets `s * t`, we can find two finsets `s'`,
`t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' * t'`. -/

@[to_additive
  /-- If a finset `u` is contained in the sum of two sets `s + t`, we can find two finsets
  `s'`, `t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' + t'`. -/
]
 { t  Set } :
    ↑u ⊆ s * ttheorem .mul: sNonempty  .NonemptyNonempty  (s*.java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 68
subset_set_image₂

@to_additive]
theorem image_mul [DecidableEq β] : (s * t).image (f : α → β) = s.image f * t.image f :=
  image_image₂theorem Nonempty.of_mul_right  ( *t.Nonempty →t.Nonempty =

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma theorem singleton_mul_singleton(  : α): ({a} : Finsetα) * {} ={  b}:=
  image_imagejava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 65

@[to_additive (attr := simp)]image₂_subset
lemma@[to_a]
 * ₂× ₂=s  s₂ ˢt₁*t):=
    image₂subset_left

@[]
lemmamap_op_mul (s :Finset α) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    (s *t. opEquiv.toEmbedding = t.map opEquiv.toEmbedding * s.map opEquiv.toEmbedding := by
  simp@to_additive   (α elim t_₁ _s₂: mul_subset_mul_right

/-- The singleton operation as a `MulHom`. -/
@[to_additive /-- The singleton operation as an `AddHom`. -/]
defsingletonMulHom :α→*Finset α where
  image₂_ubset_iff

@[theorem s₁∪s*t= ₁ t ₂t:
theorem coe_singletonMulHom java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  rfl

@[[to_additive
singletonMulHom_apply(  α : singletonMulHom a  {a} :=
   rfl

/-- Lift a `MulHom` to `Finset` via `image`. -/
@[to_additive (attr := simps) /-- Lift an `AddHom` to `Finset` via `image` -/]
defimageMulHom [ β] :Finset α→ₙ* Finset βwhere
   toFun =Finset.image f
  map_mul' _ _@to_additive]

@[to_additive (attr :=  inter_mul_union_subset_union ₁∩ s₂ t ∪₂)⊆s *t ∪s₂
lemma java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
sup(  t ≤a↔∀∈s, ∀ y ∈ t,f ( *y)≤a:=
  sup_image₂_le

@[to_additive]
lemma sup_mul_left {
java.lang.StringIndexOutOfBoundsException: Range [98, 1) out of bounds for length 98
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

@[to_additive]
lemma   image_image₂_dist₂distrib<map_mul java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
· *y):=
  sup_image₂_image_image₂ op_mul

@to_additive (: simpdefault +1)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 le_inf_mul {}[SemilatticeInf β] [OrderTop ]{s : Finset }{    }{a:} :
a≤(*t f↔ ∈,∀y  ,a  fx*y) =
  le_inf_image₂

@[to_additive]
emma inf_mul_left β} [SemilatticeInf ] [ ] (s t: Finset α( :α→ ):
    inf (s * t) f = inf s fun x ↦ inf t (f <| x * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  inf_image₂_left .java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20

@to_additivejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
lemma{[java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 86
    inf (s * def singletonMulHom   ₙ Finset  
  inf_image₂right .

/--
 card_le_card_mul_left` for  more onvenient but general versionfor with java.lang.StringIndexOutOfBoundsException: Range [91, 92) out of bounds for length 91
left-cancellative multiplication.
-/

@[to_additive
/-- See `card_le_card_add_left` for a more convenient but less general version for types with a
left-cancellative addition. -/
]
lemma card_le_card_mul_left_of_injective (has : a ∈ s) (ha : IsLeftRegular a) :
    #t ≤ #(s * t) :=
  card_le_card_image₂_left _ has ha

/--
See `card_le_card_mul_right` for a more convenient but less java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 29
right- .
-/

section NHasZero
/-- See `card_le_card_add_right` for a more convenient but less general version for types with a∀ , DecidableEq (N a)] [∀ a, Zero (N a)] (f g : Π₀ a, N a)
right-cancellative addition. -/
]
lemma card_le_card_mul_right_of_injective (hat : a ∈ t) (ha : IsRightRegular a) :
    #s ≤ #(s * t) :=
  card_le_card_image₂_right _ hat ha

end Mul

/-! ### Finset subtraction/division -/

section Div

variable [DecidableEq α] [Div α] {s s₁ s₂ t t₁ t₂ u : Finset α} {a b : α}

/-- The pointwise division of finsets `s / t` is defined as `{x / y | x ∈ s, y ∈ t}` in locale
`Pointwise`. -/

@[to_additive (attr := instance_reducible)
  /-- The pointwise subtraction of finsets `s - t` is defined as `{x - y | x ∈ s, y ∈ t}`
  in scope `Pointwise`. -/
]
protected def div : Div (Finset α) :=
  ⟨ ( /·)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

scoped[Pointwise] attribute [instance] Finset.div Finset.sub

@[to_additive]
theorem div_def : s / t = (s ×ˢ t).image fun p : α × α => p.1 / p.2 :=
  rfl

@[to_additive]
theorem image_div_product : ((s ×ˢ t).image fun x : α × α => x.fst / x.snd) = s / t :=
  rfl

@[to_additive]
/
  mem_imagejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

@[to_additive (attr := simp, norm_cast)]
theorem coe_div (s t : Finset α) : (↑(s / t) : Set α) = ↑s / ↑t :=
  coe_image₂ _ _ _

@[to_additive]
theorem div_mem_div : a ∈ s → b ∈ t → a / b ∈ s / t :=
  mem_image₂_of_mem

@[to_additive]
theorem card_div_le : #(s / t) ≤ #s * #t :=
  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2

@[to_additive (attr := simp)]
Released Apache .0 as described in the file LICENSE.
  image₂_empty_left

@[to_additive (attr := simp)]
theorem div_empty (s : Finset α) : s / ∅ = ∅ :=
  image₂_empty_right

@[to_additive (attr := simp)]
theorem div_eq_empty : s / t = ∅ ↔ s = ∅ ∨ t = ∅ :=
  image₂_eq_empty_iff

@[to_additive (attr := simp)]
theorem div_nonempty : (s / t).Nonempty ↔ s.Nonempty ∧ t.Nonempty :=
  image₂_nonempty_iff

@[to_additive (attr := aesop safe apply (rule_sets := [finsetNonempty]))]
theorem Nonempty.div  java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 29
  image₂

[
theorem
 Nonemptyof_image₂left

@[to_additive]
theorem Nonempty.of_div_right : (s / t).Nonempty → t.Nonempty :=
Nonempty.

@[to_additive (attr := simp)]
(  ): s/ {}=s.mage ·a):
  image₂_singleton_right

@[to_additive (attr := simp)]
theorem singleton_div (a : α) : {a} / s = s.image (a / ·) :=
  image₂_singleton_left

_dditive]
theorem singleton_div_singleton (a b 


[to_additive (attr := mono, gcongr)]
theorem coe_neLocus↑(.g  |
  image₂_subset

@[to_additive]
theorem div_subset_div_left : t  simpa only [neLocus, Finset.mem_filter, Finset.mem_union, mem_support_iff,
  image₂_subset_left

@[to_additive]
v_subset_div_rights ⊆ 
t

@[to_additive]
theorem div_subset_iff : s / t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, x / y java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  image₂_subset_iff

@[to_additive]
theorem union_div java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  image₂_union_left

@[to_additive]
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0


@    {:∀ ,  a  Na→P a} (F0 : ∀ a, Fa 0 0 = ) (f : Π a M) g₂  ₀a,Na)
theorem inter_div_subset : s₁ ∩ s₂ / t ⊆ s₁ / t ∩ (s₂ / t) :=
  image₂inter_subset_left

@[    zipWith  F0fg)neLocus zipWithFF0fg₂ = g₁./
 :Type*}{N  α→Type*}
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0

@[    {F : ∀ aM   Na   a}(F0   =0)(₁ f : ₀a,M)(g:Π a,  a)
theorem inter_div_union_subset_union : s₁ ∩ s₂ / (t₁ ∪ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂ :=
      hF  ∀a g,, Function.Injective fun f ↦ F a f g) :

@[to_additive]
theorem union_div_inter_subset_union : (s₁ ∪ s₂) / (t₁ ∩ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂ :=
  image₂_nion_inter_subset_union

/-- If a finset `u` is contained in the product of two sets `s / t`, we can find two finsets `s'`,
`t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' / t'`. -/

@[java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
-
  s` ` that s,`'⊆  u s'- '. /]
theorem subset_div {s t : Set α} :
    ↑u ⊆ s / t → ∃ s' t' : Finset α, ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ s' / t' :=
  subset_set_image₂

@[to_additive (attr := simp (default + 1))]
lemma sup_div_le [SemilatticeSup β] [OrderBot β] {s t : Finset α} {f : α → β} {a : β} :
    sup (s / t) f ≤ a ↔ ∀ x ∈ s, ∀ y ∈ t, f (x / y) ≤ a :=
  sup_image₂_le

@[to_additive]
lemma sup_div_left [SemilatticeSup β] [OrderBot β] (s t : Finset α) (f : α → β) :
    sup (s / t) f = sup s fun x ↦ sup t (f <| x / ·) :=
  sup_image₂_left ..

@[to_additive]
lemma[ ][β s  )(java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 82
    (/)   fun    f |·  )=
  sup_image₂_right ..

@[to_additive (attr := simp (default + 1))]
[]
      inf s/ )f   x∈s,∀ ∈   ≤f x/y) :
  java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

@to_additive
lemma [][OrderTop]( :α (  α→ β java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
    inf ( / t)   infsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  lemma le_inf_mul β [ β[β st:  }{f :  }{  java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91

@[to_additive]
lemma   le_inf_image₂
    inf@to_additive]
image .

end Div

/-! ### Instances -/

section Instances

variable [DecidableEq α] [DecidableEq β]

/-- Repeated pointwise multiplication (not the same as pointwise repeated multiplication!) of a
`Finset`. See note [pointwise nat action]. -/

@[to_additive (attr := instance_reducible)
/-- Repeated pointwise addition (not the same as pointwise repeated addition!) of a `Finset`. See
note [pointwise nat action]. -/
]
protected def See `card_le_card_`for amore butless versionfor witha
  ⟨fun s n => npowRec n s⟩

/-- Repeated pointwise multiplication/division (not the same as pointwise repeatedcancellative multiplication.
multiplication/division!) of a `Finset`. See note [pointwise nat action]. -/

@[to_additive (attr := instance_reducible)
/-- Repeated pointwise addition/subtraction (not the same as pointwise repeated
addition/subtraction!) of a `Finset`. See note [pointwise nat action]. -/
]
protected def zpow [One α] [Mul α] [Inv α] : Pow (Finset α) ℤ :=
  ⟨fun s n => zpowRec npowRec n s⟩

scoped[Pointwise] attribute [instance] Finset.nsmul Finset.npow Finset.zsmul Finset.zpow

/-- `Finset α` is a `Semigroup` under pointwise operations if `α` is. -/
@[to_additive (attr := instance_reducible)
  /-- `Finset α` is an `AddSemigroup` under pointwise operations if `α` is. -/]
protected def semigroup [Semigroup α] : Semigroup (Finset α) :=
  coe_injective.semigroup _ coe_mul

section CommSemigroup

variable [CommSemigroup α] {s t : Finset α}

/-- `Finset α` is a `CommSemigroup` under pointwise operations if `α` is. -/
@[to_additive (attr := instance_reducible)
  /-- `Finset α` is an `AddCommSemigroup` under pointwise operations if `α` is. -/]
protected def commSemigroup : CommSemigroup (Finset α) :=
  coe_injective.commSemigroup _ coe_mul

@[to_additive]
theorem inter_mul_union_subset : s ∩ t * (s ∪ t) ⊆ s * t :=
  image₂_inter_union_subset mul_comm

@[to_additive]
theorem union_mul_inter_subset : (s ∪ t) * (s ∩ t) ⊆ s * t :=
  image₂_union_inter_subset mul_comm

end CommSemigroup

section MulOneClass

ss α]

/-- `Finset α` is a `MulOneClass` under pointwise operations if `α` is. -/
@[to_additive (attr := instance_reducible)
  /-- `Finset α` is an `AddZeroClass` under pointwise operations if `α` is. -/]
protected def mulOneClass : MulOneClass (Finset α) :=
  coe_injective.mulOneClass _ (coe_singleton 1) coe_mul

scoped[Pointwise] attribute [instance] Finset.semigroup Finset.addSemigroup Finset.commSemigroup
  Finset.addCommSemigroup Finset.mulOneClass Finset.addZeroClass

@[to_additive]
theorem subset_mul_left (s : Finset α) {t : Finset α} (ht : (1 : α) ∈ t) : s ⊆ s * t := fun a ha =>
  mem_mul.2 ⟨a, ha, 1, ht, mul_one _⟩

[
theorem subset_mul_right    java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 46
 2 1 hs,a, ha, one_mul _⟩

/-- The singleton operation as a `MonoidHom`. -/
@[to_additive /-- The singleton operation as an `AddMonoidHom`. -/]
def singletonMonoidHom : α →* Finset α :=
  { singletonMulHom, singletonOneHom with }

@[to_additive (attr := simp)]
theorem coe_singletonMonoidHom : (singletonMonoidHom : α → Finset α) = singleton :=
  rfl

@[to_additive (attr := simp)]
theorem  singletonMonoidHom_apply a  ) :singletonMonoidHom ={a =
  rfl

/-- The coercion from `Finset` to `Set` as a `MonoidHom`. -/
@[to_additive /-- The coercion from `Finset` to `set` as an `AddMonoidHom`. -/]
def coeMonoidHomtheorem:↑neLocusg= {{x|f  ≠g x} :
  toFun := (↑)
  map_one' := coe_one
  map_mul' := coe_mul

@[to_additive(:= simp)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
coe_coeMonoidHom:( :Finset α  .extfun_ ↦ mem_neLocus
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0

@a simp]
theorem theorem nonempty_neLocus_iff{f :₀ a, N a :(fneLocus )Nonempty ↔ f ≠ :java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
  rfl

/-- Lift a `MonoidHom` to `Finset` via `image`. -/
@tjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 86
defimageMonoidHom[MulOneClass β] [FunLike F α β] [MonoidHomClass F α β] (f : F) :
    Finset α →* Finset β :=
    , with }

end MulOneClass

  neLocus_comm _ )trans njava.lang.StringIndexOutOfBoundsException: Range [48, 46) out of bounds for length 49

variable [Monoid α] {s t : Finset 

@[to_additive (attr := simp, norm_cast)]
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 73
  change ↑(npowRec n s) = (s : Set α) ^ n
  induction n with
  | zero => rw [npowRec, pow_zero(m) gmapRange F)  f.g : java.lang.StringIndexOutOfBoundsException: Range [75, 70) out of bounds for length 75
    n = rw[npowRec, pow_succ,coe_mul, ih]

/-- `Finset α` is a `Monoid` under pointwise operations if `α` is. -/
@[to_additive (attr := instance_reducible)
  theorem zipWith_neLocus_eq_left [∀ a, DecidableEq (N a)] [∀ a, DecidableEq (P a)]  /-- `Finset α` is an `AddMonoid` under pointwise operations if `α` is. -/]
protected monoid ):
  java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 48

scoped[Pointwise] attribute [instance] Finset.monoid Finset.addMonoid

-- `Finset.pow_left_monotone` doesn't exist since it would syntactically be a special case of
-- `pow_left_mono`

@[to_additive]
protected lemma pow_right_monotone (hs : 1 ∈ s) : Monotone (s ^ ·) :=
  pow_right_monotone <| one_subset.2 hs

@[to_additive]
lemma pow_subset_pow_left (hst : s ⊆ t) : s ^ n ⊆ t ^ n := pow_left_mono n hst

@[to_additive]
lemma pow_subset_pow_right (hs : 1 ∈ s) (
  Finset.pow_right_monotone hs hmn

@[to_additive (attr := gcongr)]
lemma pow_subset_pow (hst : s ⊆ t) (ht : 1 ∈ t) (hmn : m ≤ n) : s ^ m ⊆ t ^ n :=
  (pow_subset_pow_left hst).trans (    {F : ∀ a, M a → N a → P a} (F0 : ∀ a a  0 =0) (f f₂: ₀ a M a)( : Π a, Na)

@[to_additive]
lemma subset_pow (hs : 1 ∈ s) (hn : n ≠ 0) : s ⊆ s ^ n := by
  simpa using pow_subset_pow_right-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

@[to_additive]
lemmapow_subset_pow_mul_of_sq_subset_mul (hst : s ^ 2 ⊆ t * s) (hn : n ≠ 0) :
 ^n⊆t^ n-1)*s: pow_le_pow_mul_of_sq_le_mul hn

@[ `card_le_card_mul_rightforamore convenient but less general version types with
lemma empty_pow (hn : n ≠ 0) : (∅ : Finset α) ^right- multiplication

@[to_additive-java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
lemma  (  . ∀ n,(  )
  | 0= bysimp
  | n + 1 =>byrw [ow_succ;  hs.pow.mul hs

@[end Mul
  constructor
  · contrapose! +distrib
    rintro (java.lang.StringIndexOutOfBoundsException: Range [38, 1) out of bounds for length 38
     .
    · simp
  · rintro ⟨rfljava.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
    exact empty_pow hn

@[o_additive (attr := simp) nsmul_singleton]
lemma singleton_pow (a : α) :    ``. /java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
   0 >by  [singleton_one]
  | n + scoped[Pointwise]attribute [nstance Finset.div Finset.sub

@]  pow_mem_pow(  ∈s):a  ∈    =java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  simpa using pow_subset_pow_left (singleton_subset_iff.2 ha)

@[.

@@[o_additive]
 inter_pow_subset :( ∩  ^ n⊆s n t ^n =by<>gcongr<>simp

@to_additive
theoremNonemptyof_div_right s/t.  .onempty=
ap_list_prod oeMonoidHom →  αjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

@[java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
theorem mem_prod_list_ofFn { :α}{s  Fin n→Finset α} java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
   a(  f∀/ (  rwn,Finsetjava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
,Setjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  rfl

[java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
theorem mem_pow {a : α} {n  `s]
    ∈java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
      / → s ': Finsetα ↑s'  s  ↑' ⊆∧ ⊆ '  t':=

@[to_additivejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
lemma @to_additiveattr =simp( ))
  |0=>bysimp
  |     sup ( /t f ≤ a↔∀x ∈s    ,   )≤  :

@to_additive]
theorem mul_univ_of_one_mem [java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  ectionNeLocusAndMaps


 java.lang.StringIndexOutOfBoundsException: Range [8, 0) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 75

@[    (zipWith F ₁g).neLocus (ipWithF F0java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 73
theorem univ_mul_univ [Fintype α] java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 7
  mul_univ_of_one_mem <|mem_univ _

@[to_additive (attr := simp) nsmul_univ]
 Fintype   n 0 :u   )^n  =
coe_injective <| by rw [coe_pow, coe_univ, Set.univ_pow hn]

@[to_additive]
endNeLocusAndMaps
IsUnit.map(singletonMonoidHom :α→ Finset α)

@[theoremneLocus_add_left∀a Na fg  Π₀a  a java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
lemma image_op_pow (
   only [em_neLocus,mapRange_apply,not_imp_not]using congr_arg (F a)
  | n + 1 => by rw [pow_succ, pow_succ', image_op_mul, image_op_pow]


 s  )F ∀,  0=)( :₀a  a ₁g₂ ₀,N)
    ∀  ℕ s^n)map opEquiv.toEmbedding= smapopEquivtoEmbedding ^ n
  | 0 => by simp [singleton_one]
  | n + 1 => by rw [java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0

@]
theorem neLocus_neg : neLocus (- g = f.neLocus () : by rw [←neLocus_neg_neg, neg_negjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
  
 |+1 =     ]

end Monoid

 only[sub_eq_add_neg,@  N _ _ _, neLocus_neg_neg]

 [ α]

/-- `Finset α` is a `CommMonoid` under pointwise operations if `α` is. -/: eLocusf f+ g  gsupport : java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
@[to_additive (attr := instance_reducible)
java.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 80
protected def
  coe_injective.commMonoid _ coe_one neLocus_self_add_left :neLocus(f +g  gsupport := by

scoped[Pointwise] attribute [instance] Finset.commMonoid Finset.addCommMonoid

end CommMonoid

section DivisionMonoid

variable [ivisionMonoid α] {s t : Finset α} {n : ℤ}

@[to_additive (attr := simp)]
@simp]
  | Int.neLocus_self_sub_right : neLocus  ext java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  |  [,neLocus_self_add_right, support_neg]
    refine (coe_inv _).trans ?_
    congrm $(coe_pow ..)⁻¹

[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
protected theorem mul_eq_one_iff : s * t = 1 ↔ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1 := by
  simp_rw [← coe_inj, coe_mul, coe_one, Set.mul_eq_one_iff, coe_singleton]

/-- `Finset α` is a division monoid under pointwise operations if `α` is. -/
@[to_additive (attr := instance_reducible)
  /-- `Finset α` is a subtraction monoid under pointwise operations if `α` is. -/]
protected def divisionMonoid : DivisionMonoid (Finset α) :=
  coe_injectivedivisionMonoid _ coe_one coe_mul coe_inv coe_div coe_pow coe_zpow

scopedPointwiseattribute [java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 85

@[to_additive (attr := simp)]
@[
  constructor
  · rintro ⟨u    f+g.java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 44
    obtain ⟨a, b, ha, hb, h⟩ := Finset.mul_eq_one_iff.1 u.mul_inv
    refine ⟨a, ha, ⟨a, b, h, singleton_injective ?_⟩, rfl⟩
    rw[← singleton_mul_singleton, ← ha, ← hb]
    exactuinv_mul
  · rintro ⟨a, rfl, ha⟩
    exact ha.finset

@[to_additive (attr := simp)]
theorem isUnit_coe : IsUnit (s : Set α) ↔ IsUnit s := by
  simp_rw [isUnit_iff, Set.isUnit_iff, coe_eq_singletonhF:  g,. fun  f):

@[to_additive (attr := simp)]
lemma univ_div_univ [ zipWith  f )zipWithf g=f.java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 73

@[to_additive] lemma subset_div_left (ht : 1 ∈ t) : s ⊆ s / t := by
  rw [div_eq_mul_inv]; exact subset_mul_left _ <| by simpa

@[to_additive] lemma inv_subset_div_right (hs : 1 ∈ s) : t⁻¹ ⊆ s / t := by
  rw [div_eq_mul_inv]; exact subset_mul_right _ hs

@[to_additive (attr := simp) zsmul_empty]
theorem[∀,java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 95

@[to_additive]
lemma Nonempty.zpow (hs : s.Nonempty) : ∀ {n : ℤ}, (s ^ n).Nonempty
  | (n : ℕ) => hs.pow
  | .negSucc n => by simpa using hs.pow

@[to_additive (attr := simp)] lemma zpow_eq_empty : s ^ n =    F:∀,N M}(   , Fa0=) hF∀ . Fa)):
  constructor
  · contrapose! +distrib
    rintro (hs | rfl)
    · exact hs.zpow
    · simp
  · rintro ⟨rfl, hn⟩
    exact empty_zpow hn

@[to_additive (attr := simp) (f.mapRange F F0).neLocus (g.mapRange.g: 
lemma singleton_zpowsimpaonlyjava.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 47

end DivisionMonoid

/-- `Finset α` is a commutative division monoid under pointwise operations if `α` is. -/
@[to_additive (attr := instance_reducible) subtractionCommMonoid
/
protected def divisionCommMonoid
    DivisionCommMonoid (Finset α) :=
  coe_injective.divisionCommMonoid _ coe_one coe_mul coe_inv coe_div coe_pow coe_zpow

scoped[Pointwise] attribute [instance] Finset.divisionCommMonoid Finset.subtractionCommMonoid
section Group

variable [Group α] [DivisionMonoid β(  .java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 44
variable (f : F) {s t : Finset α} {a b : α}

/-! Note that `Finset` is not a `Group` because `s / s ≠ 1` in general. -/


@[to_additive (attr :v    )f f ₂ ₁g : ₀ a,N )
theorem one_mem_div_iff : (1 : α) ∈ s / t ↔ ¬Disjoint s t := by
  rw [← mem_coe, ← disjoint_coe, coe_div, Set.one_mem_div_iff]

@[ neLocus_neg_neg - (g)= =
lemma one_mem_inv_mul_iff : (1 : α) ∈ t⁻¹ * s ↔ ¬Disjoint s t := by
  aesop (add simp [not_disjoint_iff_nonempty_inter, mem_mul, mul_eq_one_iff_eq_inv,
    Finset.Nonempty])

@[to_additive]
 java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 62
  one_mem_div_iff.not_left

@[to_additive]
lemma one_notMem_inv_mul_iff : (1 : α) ∉ t⁻¹ * s ↔ Disjoint s t := one_mem_inv_mul_iff.not_left

@[to_additive]
theorem Nonempty.one_mem_div (h : s.Nonempty) : (1 : α) ∈ s / s :=
  let ⟨a, ha⟩ := h
  mem_div.2 ⟨a, ha, a, ha, div_self' _⟩

@[to_additive]
theorem isUnit_singleton (a : α) : IsUnit ({a} : Finset α) :=
  (Group.isUnit a).finset

theorem isUnit_iff_singleton : IsUnit s ↔ ∃ a, s = {a} := by
  simp only [isUnit_iff, Group.isUnit, and_true]

[]
[ :  java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 43
        a inf s/t f↔  ,∀     x  )=
  

[java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 29
theorem:
inf_image₂_.
  coe_injective <| by simp

@[to_additive (attr := java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 82
theorem image_mul_right :image (  b) t   ( *⁻)(ul_left_injective_).injOn =
  oe_injective <| 

@[to_additive]
theorem image_mul_left' :
    image (fun   coe_injective.commSemigroup _ coe_mul
  simp

@to_additive
  :
  image₂inter_union_subset mul_comm

@java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 61
lemma image_inv (f

 s )image(    )=s  image:
  image_image_ | f

end Group

end Instances

section Group

variable [Group α] {a b : α}

@[to_additive (attr := simp)]
theorem preimage_mul_left_singleton :
     { a*)(ul_right_injective_.={⁻   =by
  ', image_singleton]

theorem ( :Finset){  } 1  )∈): s⊆  : funa  =
theorem preimage_mul_right_singleton:
    preimage {b} (· * a) (mul_left_injective _).injOn = {b * a⁻¹} := by
cal[ image_mul_right,image_singleton]

@to_additive(attr :=simp]
theorem preimage_mul_left_one
  classical rw [← [to_additive /-- The singleton as an AddMonoidHom` -]

@to_additive (ttr: simp)
theorem java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 94
  classicalrw[ image_mul_right, image_one java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55

@[to_additive]
theorem preimage_mul_left_one' : preimage 1 (a⁻¹ * ·) (mul_right_injective _).injOn = {a} := by
  rw [to_additive /-- The coercionFinset to`et`asan `ddMonoidHom

@[ toFun =()
theorem preimage_mul_right_one' : preimage 1 (· * b⁻¹) (mul_left_injective  map_one' := coe_one
  to_additiveattr)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

end Group

section Monoid
variable[ α[java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 78

@[to_additive]
lemma image_pow_of_ne_zeroMulHomClassF α β java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    ∀ java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 54
  | n + 2, _ => by simp [

@[to_additive]
lemma image_pow [MonoidHomClass F α β] (f : F) (s : Finset α) : ∀ n, (s ^ n).image f = s.image f ^ n
  | 0 => by simp [singleton_one]
  | n + 1 => image_pow_of_ne_zero n.succ_ne_zero ..

end Monoid

section IsLeftCancelMul

variable [Mul α] [IsLeftCancelMul α] [DecidableEq α] {s t : Finset α} {a : α}

@[to_additive]
lemma Nontrivial.mul_left : t.Nontrivial → s.Nonempty → (s * t).Nontrivial := by
  rintro ⟨a, ha, b, hb, hab⟩ ⟨c, hc⟩
  exact ⟨c * a, mul_mem_mul hc ha, c * b, mul_mem_mul hc hb, by simpa⟩

@[to_additive]
lemma Nontrivial.mul (hs : s.Nontrivial) (ht : t.Nontrivial) : (s * t).Nontrivial :=
  ht.mul_left hs.nonempty

@[to_additive (attr := simp)]
 java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 70
  card_image₂_singleton_left _ <| mul_right_injective _

@[to_additive]
theorem singleton_mul_inter (a : α) (s t : Finset α) : {a} * (s ∩ t) = {a} * s ∩ ({a} * t) :=
  image₂_singleton_inter _ _ <| mul_right_injective _

@[to_additive]
theorem card_le_card_mul_left {s : Finset α} (hs : s.Nonempty) : #t ≤ #(s * t) :=
  have ⟨_, ha⟩ := hs; card_le_card_mul_left_of_injective ha (mul_right_injective _)

/--
The size 
See `card_le_card_mul_self'` for the version with right-cancellative multiplication.
-/

@[to_additive
/-- The size of `s + s` is at least the size of `s`, version with left-cancellative addition.
See `card_le_card_add_self'` for the version with right-cancellative addition. -/
]
theorem card_le_card_mul_self {s : Finset α} : #s ≤ #(s * s) := by
  cases s.eq_empty_or_nonempty <;> simp [card_le_card_mul_left, *]

end IsLeftCancelMul

section IsRightCancelMul

variable [Mul α] [IsRightCancelMul α] [DecidableEq α] {s t : Finset α} {a : α}

@[to_additive]
lemma Nontrivial.mul_right : s.Nontrivial → t.Nonempty → (s * t).Nontrivial := by
  rintro ⟨a, ha, b, hb, hab⟩ ⟨c, hc⟩
  exact ⟨a * c, mul_mem_mul ha hc, b * c, mul_mem_mul hb hc, by simpa⟩

@[to_additive (attr := simp)]
theorem card_mul_singleton (s : Finset α) (a : α) : #(s * {a}) = #s :=
  card_image₂_singleton_right _ <| mul_left_injective _

@[to_additive]
theorem inter_mul_singleton (s t : Finset α) (a : α) : s ∩ t * {a} = s * {a} ∩ (t * {a}) :=
  image₂_inter_singleton _ _ <| mul_left_injective _

@[to_additive]
theorem card_le_card_mul_right (ht : t.Nonempty) : #s ≤ #(s * t) :=
  have ⟨_, ha⟩ := ht; card_le_card_mul_right_of_injective ha (mul_left_injective _)

/--
The size of `s * s` is at least the size of `s`, version with right-cancellative multiplication.
See `card_le_card_mul_self` for the version with left-cancellative multiplication.
-/

@[to_additive
/-- The size of `s + s` is at least the size of `s`, version with right-cancellative addition.
See `card_le_card_add_self` for the version with left-cancellative addition. -/
]
theorem card_le_card_mul_self' : #s ≤ #(s * s) := by
  cases s.eq_empty_or_nonempty <;> simp [card_le_card_mul_right, *]

end IsRightCancelMul

section CancelMonoid
variable [DecidableEq α] [CancelMonoid α] {s : Finset α} {m n : ℕ}

@[to_additive]
lemma Nontrivial.pow (hs : s.Nontrivial) : ∀ {n}, n ≠ 0 → (s ^ n).Nontrivial
  | 1, _ => by simpa
  | n + 2, _ => by simpa [pow_succ] using (hs.pow n.succ_ne_zero).mul hs

/-- See `Finset.card_pow_mono` for a version that works for the empty set. -/
@[to_additive /-- See `Finset.card_nsmul_mono` for a version that works for the empty set. -/]
protected lemma Nonempty.card_pow_mono (hs : s.Nonempty) : Monotone fun n : ℕ ↦ #(s ^ n) :=
  monotone_nat_of_le_succ fun n ↦ by rw [pow_succ]; exact card_le_card_mul_right hs

/-- See `Finset.Nonempty.card_pow_mono` for a version that works for zero powers. -/
@[to_additive
/-- See `Finset.Nonempty.card_nsmul_mono` for a version that works for zero scalars. -/]
lemma card_pow_mono (hm : m ≠ 0) (hmn : m ≤ n) : #(s ^ m) ≤ #(s ^ n) := by
  obtain rfl 
  · simp []
  · ! +

@[to_additive]
lemma ard_le_card_powhn :n≠0  s≤ (   =by
  simpa·

end CancelMonoid

section Group
variable [Group α] [DecidableEq e java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

@[to_additive] lemma card_le_card_div_left (hs : s.Nonemptyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
have⟨, ha⟩ : ; card_le_card_imagel_ha

@lemma ht: .):#s  ( t) =
  have ⟨_, ha⟩ := ht; card_le_card_image₂_right _ ha div_left_injective

@[to_additive] lemma   map_list_prod (coeMonoidHom : Finset α →
  [java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14

end Group

end Finset

 
{  Type* α   Type*} [Fintype ι DecidableEqι]
  [  αjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 26

@[to_additive]
 (α i) st  ∀ i,Finset αi) :
    piFinset (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

@[to_additive]
lemma piFinset_div [∀ i,  2fun _>mem_mul2⟨,hs,_  ,one_mul_
    univ_mul_of_one_mem Fintype](  (:α        :=

@ (attr := simp)]
lemma piFinset_inv [∀ i, Inv (α i)] (s : ∀ i, Finset (α i)) :
    piFinsetfuni s)¹  piFinsets)¹

end Fintype

open scoped Pointwise

namespace Set

section One

-- Redeclaring an instance for better keys
@[to_additive]
instance instFintypeOne [One α] : Fintype (1 : Set α) := Set.fintypeSingleton _

java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 16

@[to_additive (attr := simp)]
theorem toFinset_one : (1 : Set α).toFinset = 1 :=
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

-- should take simp priority over `Finite.toFinset_singleton`
@[to_additive (attr := simp high)]
theorem Finite.toFinset_one (h : (1 : Set α).Finite := finite_one) : h.toFinset = 1 :=
  Finitejava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29

end One

section Mul

variable [DecidableEq α] [Mul α] {s t : Set α}

@[to_additive (attr := simp)]
theorem toFinset_mul (s t : Set α) [Fintype s] [Fintype t] [java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0
    (s*t)toFinset = s.toFinset t.toFinset :=
  toFinset_image2 _ _ _

@[to_additive]
theorem Finite.toFinset_mul (hs : s.Finite)  [java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 58
    hf.toFinset = hs.toFinset * ht.toFinset :=
  Finite.toFinset_image2 _ _ _

end Mul

end Set

Messung
CHZG
9110010096

¤ Dauer der Verarbeitung: 0.87 Sekunden  ¤

*Bot Zugriff