1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: isComplete_iff_ultrafilter'
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: simp only [le_principal_iff, Ultrafilter.mem_coe]
state_before: α : Type u
β : Type v
uniformSpace : UniformSpace α
s : Set α
⊢ (∀ (l : Ultrafilter α), Cauchy ↑l → ↑l ≤ 𝓟 s → ∃ x ∈ s, ↑l ≤ 𝓝 x) ↔
    ∀ (l : Ultrafilter α), Cauchy ↑l → s ∈ l → ∃ x ∈ s, ↑l ≤ 𝓝 x
state_after: no goals
Theorem: MeasureTheory.Measure.absolutelyContinuous_sum_left
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp [sum_apply _ hs, fun i ↦ hμs i hs0]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f : α → β
μs : ι → Measure α
hμs : ∀ (i : ι), μs i ≪ ν
s : Set α
hs : MeasurableSet s
hs0 : ν s = 0
⊢ (sum μs) s = 0
state_after: no goals
Theorem: MeasureTheory.union_ae_eq_right
File: Mathlib/MeasureTheory/OuterMeasure/AE.lean

tactic: simp [eventuallyLE_antisymm_iff, ae_le_set, union_diff_right,
  diff_eq_empty.2 Set.subset_union_right]
state_before: α : Type u_1
β : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s t : Set α
⊢ s ∪ t =ᶠ[ae μ] t ↔ μ (s \ t) = 0
state_after: no goals
Theorem: QuadraticForm.isOrtho_comm
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp_rw [isOrtho_def, add_comm]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
Q : QuadraticForm R M
x y : M
⊢ Q.IsOrtho x y ↔ Q.IsOrtho y x
state_after: no goals
Theorem: Finset.le_card_diffs_mul_card_diffs
File: Mathlib/Combinatorics/SetFamily/FourFunctions.lean

tactic: have : ∀ s t : Finset α, (s \\ t).map ⟨_, liftLatticeHom_injective⟩ =
    s.map ⟨_, liftLatticeHom_injective⟩ \\ t.map ⟨_, liftLatticeHom_injective⟩ := by
  rintro s t
  simp_rw [map_eq_image]
  exact image_image₂_distrib fun a b ↦ rfl
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s t : Finset α
⊢ s.card * t.card ≤ (s \\ t).card * (t \\ s).card
state_after: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s t : Finset α
this :
  ∀ (s t : Finset α),
    map { toFun := ⇑liftLatticeHom, inj' := ⋯ } (s \\ t) =
      map { toFun := ⇑liftLatticeHom, inj' := ⋯ } s \\ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } t
⊢ s.card * t.card ≤ (s \\ t).card * (t \\ s).card

tactic: simpa [← card_compls (_ ⊻ _), ← map_sup, ← map_inf, ← this] using
  (s.map ⟨_, liftLatticeHom_injective⟩).le_card_infs_mul_card_sups
    (t.map ⟨_, liftLatticeHom_injective⟩)ᶜˢ
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s t : Finset α
this :
  ∀ (s t : Finset α),
    map { toFun := ⇑liftLatticeHom, inj' := ⋯ } (s \\ t) =
      map { toFun := ⇑liftLatticeHom, inj' := ⋯ } s \\ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } t
⊢ s.card * t.card ≤ (s \\ t).card * (t \\ s).card
state_after: no goals

tactic: rintro s t
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s t : Finset α
⊢ ∀ (s t : Finset α),
    map { toFun := ⇑liftLatticeHom, inj' := ⋯ } (s \\ t) =
      map { toFun := ⇑liftLatticeHom, inj' := ⋯ } s \\ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } t
state_after: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s✝ t✝ s t : Finset α
⊢ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } (s \\ t) =
    map { toFun := ⇑liftLatticeHom, inj' := ⋯ } s \\ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } t

tactic: simp_rw [map_eq_image]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s✝ t✝ s t : Finset α
⊢ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } (s \\ t) =
    map { toFun := ⇑liftLatticeHom, inj' := ⋯ } s \\ map { toFun := ⇑liftLatticeHom, inj' := ⋯ } t
state_after: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s✝ t✝ s t : Finset α
⊢ image (⇑{ toFun := ⇑liftLatticeHom, inj' := ⋯ }) (s \\ t) =
    image (⇑{ toFun := ⇑liftLatticeHom, inj' := ⋯ }) s \\ image (⇑{ toFun := ⇑liftLatticeHom, inj' := ⋯ }) t

tactic: exact image_image₂_distrib fun a b ↦ rfl
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : GeneralizedBooleanAlgebra α
s✝ t✝ s t : Finset α
⊢ image (⇑{ toFun := ⇑liftLatticeHom, inj' := ⋯ }) (s \\ t) =
    image (⇑{ toFun := ⇑liftLatticeHom, inj' := ⋯ }) s \\ image (⇑{ toFun := ⇑liftLatticeHom, inj' := ⋯ }) t
state_after: no goals
Theorem: Sigma.Lex.mono
File: Mathlib/Data/Sigma/Lex.lean

tactic: obtain ⟨a, b, hij⟩ | ⟨a, b, hab⟩ := h
state_before: ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
a✝ b✝ : (i : ι) × α i
hr : ∀ (a b : ι), r₁ a b → r₂ a b
hs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b
a b : (i : ι) × α i
h : Lex r₁ s₁ a b
⊢ Lex r₂ s₂ a b
state_after: case left
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
a✝ b✝ : (i : ι) × α i
hr : ∀ (a b : ι), r₁ a b → r₂ a b
hs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b
i✝ j✝ : ι
a : α i✝
b : α j✝
hij : r₁ i✝ j✝
⊢ Lex r₂ s₂ ⟨i✝, a⟩ ⟨j✝, b⟩

case right
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
a✝ b✝ : (i : ι) × α i
hr : ∀ (a b : ι), r₁ a b → r₂ a b
hs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b
i✝ : ι
a b : α i✝
hab : s₁ i✝ a b
⊢ Lex r₂ s₂ ⟨i✝, a⟩ ⟨i✝, b⟩

tactic: exact Lex.left _ _ (hr _ _ hij)
state_before: case left
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
a✝ b✝ : (i : ι) × α i
hr : ∀ (a b : ι), r₁ a b → r₂ a b
hs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b
i✝ j✝ : ι
a : α i✝
b : α j✝
hij : r₁ i✝ j✝
⊢ Lex r₂ s₂ ⟨i✝, a⟩ ⟨j✝, b⟩
state_after: no goals

tactic: exact Lex.right _ _ (hs _ _ _ hab)
state_before: case right
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
a✝ b✝ : (i : ι) × α i
hr : ∀ (a b : ι), r₁ a b → r₂ a b
hs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b
i✝ : ι
a b : α i✝
hab : s₁ i✝ a b
⊢ Lex r₂ s₂ ⟨i✝, a⟩ ⟨i✝, b⟩
state_after: no goals
Theorem: quadraticChar_sq_one'
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean

tactic: simp only [quadraticChar_apply, quadraticCharFun, sq_eq_zero_iff, ha, IsSquare_sq, if_true,
  if_false]
state_before: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
a : F
ha : a ≠ 0
⊢ (quadraticChar F) (a ^ 2) = 1
state_after: no goals
Theorem: Prime.pow_dvd_of_dvd_mul_right
File: Mathlib/Algebra/Associated.lean

tactic: rw [mul_comm] at h'
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n : ℕ
h : ¬p ∣ b
h' : p ^ n ∣ a * b
⊢ p ^ n ∣ a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n : ℕ
h : ¬p ∣ b
h' : p ^ n ∣ b * a
⊢ p ^ n ∣ a

tactic: exact hp.pow_dvd_of_dvd_mul_left n h h'
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CancelCommMonoidWithZero α
p a b : α
hp : Prime p
n : ℕ
h : ¬p ∣ b
h' : p ^ n ∣ b * a
⊢ p ^ n ∣ a
state_after: no goals
Theorem: SimpleGraph.Subgraph.deleteEdges_deleteEdges
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext <;> simp [and_assoc, not_or]
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : G.Subgraph
s✝ s s' : Set (Sym2 V)
⊢ (G'.deleteEdges s).deleteEdges s' = G'.deleteEdges (s ∪ s')
state_after: no goals
Theorem: Int.mem_zmultiples_iff
File: Mathlib/Algebra/Group/Subgroup/ZPowers.lean

tactic: rw [mul_comm, eq_comm, ← smul_eq_mul]
state_before: G : Type u_1
inst✝² : Group G
A : Type u_2
inst✝¹ : AddGroup A
N : Type u_3
inst✝ : Group N
a b k : ℤ
⊢ (fun x => x • a) k = b ↔ b = a * k
state_after: no goals
Theorem: Nat.fib_eq_zero
File: Mathlib/Data/Nat/Fib/Basic.lean

tactic: simp [fib_add_two, fib_eq_zero]
state_before: n : ℕ
⊢ fib (n + 2) = 0 ↔ n + 2 = 0
state_after: no goals
Theorem: dist_self_mul_right
File: Mathlib/Analysis/Normed/Group/Uniform.lean

tactic: rw [← dist_one_left, ← dist_mul_left a 1 b, mul_one]
state_before: 𝓕 : Type u_1
α : Type u_2
E : Type u_3
F : Type u_4
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a✝ a₁ a₂ b✝ b₁ b₂ : E
r r₁ r₂ : ℝ
a b : E
⊢ dist a (a * b) = ‖b‖
state_after: no goals
Theorem: Filter.Eventually.volume_pos_of_nhds_real
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: rcases h.exists_Ioo_subset with ⟨l, u, hx, hs⟩
state_before: ι : Type u_1
inst✝ : Fintype ι
p : ℝ → Prop
a : ℝ
h : ∀ᶠ (x : ℝ) in 𝓝 a, p x
⊢ 0 < volume {x | p x}
state_after: case intro.intro.intro
ι : Type u_1
inst✝ : Fintype ι
p : ℝ → Prop
a : ℝ
h : ∀ᶠ (x : ℝ) in 𝓝 a, p x
l u : ℝ
hx : a ∈ Ioo l u
hs : Ioo l u ⊆ {x | p x}
⊢ 0 < volume {x | p x}

tactic: refine lt_of_lt_of_le ?_ (measure_mono hs)
state_before: case intro.intro.intro
ι : Type u_1
inst✝ : Fintype ι
p : ℝ → Prop
a : ℝ
h : ∀ᶠ (x : ℝ) in 𝓝 a, p x
l u : ℝ
hx : a ∈ Ioo l u
hs : Ioo l u ⊆ {x | p x}
⊢ 0 < volume {x | p x}
state_after: case intro.intro.intro
ι : Type u_1
inst✝ : Fintype ι
p : ℝ → Prop
a : ℝ
h : ∀ᶠ (x : ℝ) in 𝓝 a, p x
l u : ℝ
hx : a ∈ Ioo l u
hs : Ioo l u ⊆ {x | p x}
⊢ 0 < volume (Ioo l u)

tactic: simpa [-mem_Ioo] using hx.1.trans hx.2
state_before: case intro.intro.intro
ι : Type u_1
inst✝ : Fintype ι
p : ℝ → Prop
a : ℝ
h : ∀ᶠ (x : ℝ) in 𝓝 a, p x
l u : ℝ
hx : a ∈ Ioo l u
hs : Ioo l u ⊆ {x | p x}
⊢ 0 < volume (Ioo l u)
state_after: no goals
Theorem: Metric.closedBall_eq_empty
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

tactic: rw [← not_nonempty_iff_eq_empty, nonempty_closedBall, not_le]
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
⊢ closedBall x ε = ∅ ↔ ε < 0
state_after: no goals
Theorem: CategoryTheory.FinitaryPreExtensive.isUniversal_finiteCoproducts
File: Mathlib/CategoryTheory/Extensive.lean

tactic: obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin ι
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
⊢ IsUniversalColimit c
state_after: case intro.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
n : ℕ
e : ι ≃ Fin n
⊢ IsUniversalColimit c

tactic: apply (IsUniversalColimit.whiskerEquivalence_iff (Discrete.equivalence e).symm).mp
state_before: case intro.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
n : ℕ
e : ι ≃ Fin n
⊢ IsUniversalColimit c
state_after: case intro.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
n : ℕ
e : ι ≃ Fin n
⊢ IsUniversalColimit (Cocone.whisker (Discrete.equivalence e).symm.functor c)

tactic: apply FinitaryPreExtensive.isUniversal_finiteCoproducts_Fin
state_before: case intro.intro
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
n : ℕ
e : ι ≃ Fin n
⊢ IsUniversalColimit (Cocone.whisker (Discrete.equivalence e).symm.functor c)
state_after: case intro.intro.hc
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
n : ℕ
e : ι ≃ Fin n
⊢ IsColimit (Cocone.whisker (Discrete.equivalence e).symm.functor c)

tactic: exact (IsColimit.whiskerEquivalenceEquiv (Discrete.equivalence e).symm) hc
state_before: case intro.intro.hc
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
D : Type u''
inst✝² : Category.{v'', u''} D
X Y : C
inst✝¹ : FinitaryPreExtensive C
ι : Type u_1
inst✝ : Finite ι
F : Discrete ι ⥤ C
c : Cocone F
hc : IsColimit c
n : ℕ
e : ι ≃ Fin n
⊢ IsColimit (Cocone.whisker (Discrete.equivalence e).symm.functor c)
state_after: no goals
Theorem: NatOrdinal.toOrdinal_cast_nat
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

tactic: induction' n with n hn
state_before: n : ℕ
⊢ toOrdinal ↑n = ↑n
state_after: case zero

⊢ toOrdinal ↑0 = ↑0

case succ
n : ℕ
hn : toOrdinal ↑n = ↑n
⊢ toOrdinal ↑(n + 1) = ↑(n + 1)

tactic: rfl
state_before: case zero

⊢ toOrdinal ↑0 = ↑0
state_after: no goals

tactic: change (toOrdinal n) ♯ 1 = n + 1
state_before: case succ
n : ℕ
hn : toOrdinal ↑n = ↑n
⊢ toOrdinal ↑(n + 1) = ↑(n + 1)
state_after: case succ
n : ℕ
hn : toOrdinal ↑n = ↑n
⊢ toOrdinal ↑n ♯ 1 = ↑n + 1

tactic: rw [hn]
state_before: case succ
n : ℕ
hn : toOrdinal ↑n = ↑n
⊢ toOrdinal ↑n ♯ 1 = ↑n + 1
state_after: case succ
n : ℕ
hn : toOrdinal ↑n = ↑n
⊢ ↑n ♯ 1 = ↑n + 1

tactic: exact nadd_one n
state_before: case succ
n : ℕ
hn : toOrdinal ↑n = ↑n
⊢ ↑n ♯ 1 = ↑n + 1
state_after: no goals
Theorem: Bool.injective_iff
File: Mathlib/Data/Bool/Basic.lean

tactic: cases x <;> cases y
state_before: α : Sort u_1
f : Bool → α
H : f false ≠ f true
x y : Bool
hxy : f x = f y
⊢ x = y
state_after: case false.false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f false = f false
⊢ false = false

case false.true
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f false = f true
⊢ false = true

case true.false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f true = f false
⊢ true = false

case true.true
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f true = f true
⊢ true = true

tactic: exacts [rfl, (H hxy).elim, (H hxy.symm).elim, rfl]
state_before: case false.false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f false = f false
⊢ false = false

case false.true
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f false = f true
⊢ false = true

case true.false
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f true = f false
⊢ true = false

case true.true
α : Sort u_1
f : Bool → α
H : f false ≠ f true
hxy : f true = f true
⊢ true = true
state_after: no goals
Theorem: WeierstrassCurve.natDegree_Φ_le
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: induction n using Int.negInduction with
| nat n => exact (W.natDegree_coeff_Φ_ofNat n).left
| neg => rwa [Φ_neg, Int.natAbs_neg]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℤ
⊢ (W.Φ n).natDegree ≤ n.natAbs ^ 2
state_after: no goals

tactic: exact (W.natDegree_coeff_Φ_ofNat n).left
state_before: case nat
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℕ
⊢ (W.Φ ↑n).natDegree ≤ (↑n).natAbs ^ 2
state_after: no goals

tactic: rwa [Φ_neg, Int.natAbs_neg]
state_before: case neg
R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n✝ : ℕ
a✝ : (W.Φ ↑n✝).natDegree ≤ (↑n✝).natAbs ^ 2
⊢ (W.Φ (-↑n✝)).natDegree ≤ (-↑n✝).natAbs ^ 2
state_after: no goals
Theorem: MvPolynomial.NewtonIdentities.esymm_summand_to_weight
File: Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean

tactic: simp [weight, mem_powersetCard_univ.mp h, mul_assoc]
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
A : Finset σ
h : A ∈ powersetCard k univ
⊢ ∑ j ∈ A, MvPolynomial.NewtonIdentities.weight σ R k (A, j) = ↑k * (-1) ^ k * ∏ i ∈ A, X i
state_after: no goals
Theorem: SetTheory.PGame.Impartial.impartial_congr
File: Mathlib/SetTheory/Game/Impartial.lean

tactic: intro h
state_before: G H : PGame
e : G ≡r H
⊢ ∀ [inst : G.Impartial], H.Impartial
state_after: G H : PGame
e : G ≡r H
h : G.Impartial
⊢ H.Impartial

tactic: exact impartial_def.2
  ⟨Equiv.trans e.symm.equiv (Equiv.trans (neg_equiv_self G) (neg_equiv_neg_iff.2 e.equiv)),
    fun i => impartial_congr (e.moveLeftSymm i), fun j => impartial_congr (e.moveRightSymm j)⟩
state_before: G H : PGame
e : G ≡r H
h : G.Impartial
⊢ H.Impartial
state_after: no goals
Theorem: CategoryTheory.ShortComplex.RightHomologyData.ofIsLimitKernelFork_g'
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

tactic: rw [← cancel_epi (ofIsLimitKernelFork S hf c hc).p, p_g',
  ofIsLimitKernelFork_p, id_comp]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.RightHomologyData
A : C
hf : S.f = 0
c : KernelFork S.g
hc : IsLimit c
⊢ (ofIsLimitKernelFork S hf c hc).g' = S.g
state_after: no goals
Theorem: FirstOrder.Language.Equiv.self_comp_symm_toHom
File: Mathlib/ModelTheory/Basic.lean

tactic: rw [← comp_toHom, self_comp_symm, refl_toHom]
state_before: L : Language
L' : Language
M : Type w
N : Type w'
inst✝³ : L.Structure M
inst✝² : L.Structure N
P : Type u_1
inst✝¹ : L.Structure P
Q : Type u_2
inst✝ : L.Structure Q
f : M ≃[L] N
⊢ f.toHom.comp f.symm.toHom = Hom.id L N
state_after: no goals
Theorem: minpoly.two_le_natDegree_iff
File: Mathlib/FieldTheory/Minpoly/Basic.lean

tactic: rw [iff_not_comm, ← natDegree_eq_one_iff, not_le]
state_before: A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
int : IsIntegral A x
⊢ 2 ≤ (minpoly A x).natDegree ↔ x ∉ (algebraMap A B).range
state_after: A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
int : IsIntegral A x
⊢ (minpoly A x).natDegree = 1 ↔ (minpoly A x).natDegree < 2

tactic: exact ⟨fun h ↦ h.trans_lt one_lt_two, fun h ↦ by linarith only [minpoly.natDegree_pos int, h]⟩
state_before: A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
int : IsIntegral A x
⊢ (minpoly A x).natDegree = 1 ↔ (minpoly A x).natDegree < 2
state_after: no goals

tactic: linarith only [minpoly.natDegree_pos int, h]
state_before: A : Type u_1
B : Type u_2
B' : Type u_3
inst✝³ : CommRing A
inst✝² : Ring B
inst✝¹ : Algebra A B
x : B
inst✝ : Nontrivial B
int : IsIntegral A x
h : (minpoly A x).natDegree < 2
⊢ (minpoly A x).natDegree = 1
state_after: no goals
Theorem: SimpleGraph.map_le_iff_le_comap
File: Mathlib/Combinatorics/SimpleGraph/Maps.lean

tactic: rintro h _ _ ⟨u, v, ha, rfl, rfl⟩
state_before: V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G'✝ : SimpleGraph W
u v : V
f : V ↪ W
G : SimpleGraph V
G' : SimpleGraph W
⊢ G ≤ SimpleGraph.comap (⇑f) G' → SimpleGraph.map f G ≤ G'
state_after: case intro.intro.intro.intro
V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G'✝ : SimpleGraph W
u✝ v✝ : V
f : V ↪ W
G : SimpleGraph V
G' : SimpleGraph W
h : G ≤ SimpleGraph.comap (⇑f) G'
u v : V
ha : G.Adj u v
⊢ G'.Adj (f u) (f v)

tactic: exact h ha
state_before: case intro.intro.intro.intro
V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G'✝ : SimpleGraph W
u✝ v✝ : V
f : V ↪ W
G : SimpleGraph V
G' : SimpleGraph W
h : G ≤ SimpleGraph.comap (⇑f) G'
u v : V
ha : G.Adj u v
⊢ G'.Adj (f u) (f v)
state_after: no goals
Theorem: inv_neg
File: Mathlib/Algebra/Field/Basic.lean

tactic: rw [neg_inv]
state_before: α : Type u_1
β : Type u_2
K : Type u_3
inst✝¹ : DivisionMonoid K
inst✝ : HasDistribNeg K
a b : K
⊢ (-a)⁻¹ = -a⁻¹
state_after: no goals
Theorem: CategoryTheory.sum_tensor
File: Mathlib/CategoryTheory/Monoidal/Preadditive.lean

tactic: simp only [tensorHom_def, sum_whiskerRight, Preadditive.sum_comp]
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalPreadditive C
P Q R S : C
J : Type u_2
s : Finset J
f : P ⟶ Q
g : J → (R ⟶ S)
⊢ (∑ j ∈ s, g j) ⊗ f = ∑ j ∈ s, g j ⊗ f
state_after: no goals
Theorem: Polynomial.eval₂_at_natCast
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: convert eval₂_at_apply (p := p) f n
state_before: R : Type u
S✝ : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
x : R
S : Type u_1
inst✝ : Semiring S
f : R →+* S
n : ℕ
⊢ eval₂ f (↑n) p = f (eval (↑n) p)
state_after: case h.e'_2.h.e'_6
R : Type u
S✝ : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
x : R
S : Type u_1
inst✝ : Semiring S
f : R →+* S
n : ℕ
⊢ ↑n = f ↑n

tactic: simp
state_before: case h.e'_2.h.e'_6
R : Type u
S✝ : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
x : R
S : Type u_1
inst✝ : Semiring S
f : R →+* S
n : ℕ
⊢ ↑n = f ↑n
state_after: no goals
Theorem: LinearMap.isIdempotentElem_apply_one_iff
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [IsIdempotentElem, ← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, IsIdempotentElem, ext_iff]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : Module.End R R
⊢ IsIdempotentElem (f 1) ↔ IsIdempotentElem f
state_after: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : Module.End R R
⊢ f (f 1) = f 1 ↔ ∀ (x : R), (f * f) x = f x

tactic: simp_rw [mul_apply]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : Module.End R R
⊢ f (f 1) = f 1 ↔ ∀ (x : R), (f * f) x = f x
state_after: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : Module.End R R
⊢ f (f 1) = f 1 ↔ ∀ (x : R), f (f x) = f x

tactic: rw [← mul_one r, ← smul_eq_mul, map_smul, map_smul, h]
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
f : Module.End R R
h : f (f 1) = f 1
r : R
⊢ f (f r) = f r
state_after: no goals
Theorem: schnirelmannDensity_setOf_modeq_one
File: Mathlib/Combinatorics/Schnirelmann.lean

tactic: rcases eq_or_ne m 1 with rfl | hm
state_before: m : ℕ
⊢ schnirelmannDensity {n | n ≡ 1 [MOD m]} = (↑m)⁻¹
state_after: case inl

⊢ schnirelmannDensity {n | n ≡ 1 [MOD 1]} = (↑1)⁻¹

case inr
m : ℕ
hm : m ≠ 1
⊢ schnirelmannDensity {n | n ≡ 1 [MOD m]} = (↑m)⁻¹

tactic: rw [← schnirelmannDensity_setOf_mod_eq_one hm]
state_before: case inr
m : ℕ
hm : m ≠ 1
⊢ schnirelmannDensity {n | n ≡ 1 [MOD m]} = (↑m)⁻¹
state_after: case inr
m : ℕ
hm : m ≠ 1
⊢ schnirelmannDensity {n | n ≡ 1 [MOD m]} = schnirelmannDensity {n | n % m = 1}

tactic: apply schnirelmannDensity_congr
state_before: case inr
m : ℕ
hm : m ≠ 1
⊢ schnirelmannDensity {n | n ≡ 1 [MOD m]} = schnirelmannDensity {n | n % m = 1}
state_after: case inr.h
m : ℕ
hm : m ≠ 1
⊢ {n | n ≡ 1 [MOD m]} = {n | n % m = 1}

tactic: ext n
state_before: case inr.h
m : ℕ
hm : m ≠ 1
⊢ {n | n ≡ 1 [MOD m]} = {n | n % m = 1}
state_after: case inr.h.h
m : ℕ
hm : m ≠ 1
n : ℕ
⊢ n ∈ {n | n ≡ 1 [MOD m]} ↔ n ∈ {n | n % m = 1}

tactic: simp only [Set.mem_setOf_eq, Nat.ModEq, Nat.one_mod_of_ne_one hm]
state_before: case inr.h.h
m : ℕ
hm : m ≠ 1
n : ℕ
⊢ n ∈ {n | n ≡ 1 [MOD m]} ↔ n ∈ {n | n % m = 1}
state_after: no goals

tactic: simp [Nat.modEq_one]
state_before: case inl

⊢ schnirelmannDensity {n | n ≡ 1 [MOD 1]} = (↑1)⁻¹
state_after: no goals
Theorem: isLeast_union_iff
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp [IsLeast, lowerBounds_union, or_and_right, and_comm (a := a ∈ t), and_assoc]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝¹ : Preorder α
inst✝ : Preorder β
s✝ t✝ : Set α
a✝ b a : α
s t : Set α
⊢ IsLeast (s ∪ t) a ↔ IsLeast s a ∧ a ∈ lowerBounds t ∨ a ∈ lowerBounds s ∧ IsLeast t a
state_after: no goals