1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: LocalRing.isLocalRingHom_iff_comap_closedPoint
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: have := (local_hom_TFAE f).out 0 4
state_before: R : Type u
S✝ : Type v
inst✝³ : CommSemiring R
inst✝² : LocalRing R
S : Type v
inst✝¹ : CommSemiring S
inst✝ : LocalRing S
f : R →+* S
⊢ IsLocalRingHom f ↔ (PrimeSpectrum.comap f) (closedPoint S) = closedPoint R
state_after: R : Type u
S✝ : Type v
inst✝³ : CommSemiring R
inst✝² : LocalRing R
S : Type v
inst✝¹ : CommSemiring S
inst✝ : LocalRing S
f : R →+* S
this : IsLocalRingHom f ↔ Ideal.comap f (maximalIdeal S) = maximalIdeal R
⊢ IsLocalRingHom f ↔ (PrimeSpectrum.comap f) (closedPoint S) = closedPoint R

tactic: rw [this, PrimeSpectrum.ext_iff]
state_before: R : Type u
S✝ : Type v
inst✝³ : CommSemiring R
inst✝² : LocalRing R
S : Type v
inst✝¹ : CommSemiring S
inst✝ : LocalRing S
f : R →+* S
this : IsLocalRingHom f ↔ Ideal.comap f (maximalIdeal S) = maximalIdeal R
⊢ IsLocalRingHom f ↔ (PrimeSpectrum.comap f) (closedPoint S) = closedPoint R
state_after: R : Type u
S✝ : Type v
inst✝³ : CommSemiring R
inst✝² : LocalRing R
S : Type v
inst✝¹ : CommSemiring S
inst✝ : LocalRing S
f : R →+* S
this : IsLocalRingHom f ↔ Ideal.comap f (maximalIdeal S) = maximalIdeal R
⊢ Ideal.comap f (maximalIdeal S) = maximalIdeal R ↔
    ((PrimeSpectrum.comap f) (closedPoint S)).asIdeal = (closedPoint R).asIdeal

tactic: rfl
state_before: R : Type u
S✝ : Type v
inst✝³ : CommSemiring R
inst✝² : LocalRing R
S : Type v
inst✝¹ : CommSemiring S
inst✝ : LocalRing S
f : R →+* S
this : IsLocalRingHom f ↔ Ideal.comap f (maximalIdeal S) = maximalIdeal R
⊢ Ideal.comap f (maximalIdeal S) = maximalIdeal R ↔
    ((PrimeSpectrum.comap f) (closedPoint S)).asIdeal = (closedPoint R).asIdeal
state_after: no goals
Theorem: Filter.prod_def
File: Mathlib/Order/Filter/Lift.lean

tactic: simpa only [Filter.lift', Filter.lift, (f.basis_sets.prod g.basis_sets).eq_biInf,
  iInf_prod, iInf_and] using iInf_congr fun i => iInf_comm
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
f✝ f : Filter α
g : Filter β
⊢ f ×ˢ g = f.lift fun s => g.lift' fun t => s ×ˢ t
state_after: no goals
Theorem: Set.image_sub_const_Iio
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [sub_eq_neg_add]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x - a) '' Iio b = Iio (b - a)
state_after: no goals
Theorem: Lagrange.values_eq_on_of_interpolate_eq
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [← eval_interpolate_at_node r hvs hi, hrr', eval_interpolate_at_node r' hvs hi]
state_before: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
hvs : Set.InjOn v ↑s
hrr' : (interpolate s v) r = (interpolate s v) r'
x✝ : ι
hi : x✝ ∈ s
⊢ r x✝ = r' x✝
state_after: no goals
Theorem: Finset.sum_card_bipartiteAbove_eq_sum_card_bipartiteBelow
File: Mathlib/Combinatorics/Enumerative/DoubleCounting.lean

tactic: simp_rw [card_eq_sum_ones, bipartiteAbove, bipartiteBelow, sum_filter]
state_before: α : Type u_1
β : Type u_2
r : α → β → Prop
s : Finset α
t : Finset β
a a' : α
b b' : β
inst✝² : DecidablePred (r a)
inst✝¹ : (a : α) → Decidable (r a b)
m n : ℕ
inst✝ : (a : α) → (b : β) → Decidable (r a b)
⊢ ∑ a ∈ s, (bipartiteAbove r t a).card = ∑ b ∈ t, (bipartiteBelow r s b).card
state_after: α : Type u_1
β : Type u_2
r : α → β → Prop
s : Finset α
t : Finset β
a a' : α
b b' : β
inst✝² : DecidablePred (r a)
inst✝¹ : (a : α) → Decidable (r a b)
m n : ℕ
inst✝ : (a : α) → (b : β) → Decidable (r a b)
⊢ (∑ x ∈ s, ∑ a ∈ t, if r x a then 1 else 0) = ∑ x ∈ t, ∑ a ∈ s, if r a x then 1 else 0

tactic: exact sum_comm
state_before: α : Type u_1
β : Type u_2
r : α → β → Prop
s : Finset α
t : Finset β
a a' : α
b b' : β
inst✝² : DecidablePred (r a)
inst✝¹ : (a : α) → Decidable (r a b)
m n : ℕ
inst✝ : (a : α) → (b : β) → Decidable (r a b)
⊢ (∑ x ∈ s, ∑ a ∈ t, if r x a then 1 else 0) = ∑ x ∈ t, ∑ a ∈ s, if r a x then 1 else 0
state_after: no goals
Theorem: Ordinal.apply_lt_nfpBFamily_iff
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: haveI := out_nonempty_iff_ne_zero.2 ho
state_before: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < o.nfpBFamily f a
⊢ b < o.nfpBFamily f a
state_after: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < o.nfpBFamily f a
this : Nonempty (Quotient.out o).α
⊢ b < o.nfpBFamily f a

tactic: refine (apply_lt_nfpFamily_iff.{u, v} ?_).1 fun _ => h _ _
state_before: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < o.nfpBFamily f a
this : Nonempty (Quotient.out o).α
⊢ b < o.nfpBFamily f a
state_after: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < o.nfpBFamily f a
this : Nonempty (Quotient.out o).α
⊢ ∀ (i : (Quotient.out o).α), IsNormal (o.familyOfBFamily f i)

tactic: exact fun _ => H _ _
state_before: o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < o.nfpBFamily f a
this : Nonempty (Quotient.out o).α
⊢ ∀ (i : (Quotient.out o).α), IsNormal (o.familyOfBFamily f i)
state_after: no goals
Theorem: MonoidAlgebra.support_mul
File: Mathlib/Algebra/MonoidAlgebra/Support.lean

tactic: rw [MonoidAlgebra.mul_def]
state_before: k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : Mul G
inst✝ : DecidableEq G
a b : MonoidAlgebra k G
⊢ (a * b).support ⊆ a.support * b.support
state_after: k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : Mul G
inst✝ : DecidableEq G
a b : MonoidAlgebra k G
⊢ (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support

tactic: exact support_sum.trans <| biUnion_subset.2 fun _x hx ↦
  support_sum.trans <| biUnion_subset.2 fun _y hy ↦
    support_single_subset.trans <| singleton_subset_iff.2 <| mem_image₂_of_mem hx hy
state_before: k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : Mul G
inst✝ : DecidableEq G
a b : MonoidAlgebra k G
⊢ (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support
state_after: no goals
Theorem: HomologicalComplex.homotopyCofiber.inlX_desc_f
File: Mathlib/Algebra/Homology/HomotopyCofiber.lean

tactic: obtain rfl := c.next_eq' hjk
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝¹ : HasHomotopyCofiber φ
inst✝ : DecidableRel c.Rel
α : G ⟶ K
hα : Homotopy (φ ≫ α) 0
i j : ι
hjk : c.Rel j i
⊢ inlX φ i j hjk ≫ (desc φ α hα).f j = hα.hom i j
state_after: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝¹ : HasHomotopyCofiber φ
inst✝ : DecidableRel c.Rel
α : G ⟶ K
hα : Homotopy (φ ≫ α) 0
j : ι
hjk : c.Rel j (c.next j)
⊢ inlX φ (c.next j) j hjk ≫ (desc φ α hα).f j = hα.hom (c.next j) j

tactic: dsimp [desc]
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝¹ : HasHomotopyCofiber φ
inst✝ : DecidableRel c.Rel
α : G ⟶ K
hα : Homotopy (φ ≫ α) 0
j : ι
hjk : c.Rel j (c.next j)
⊢ inlX φ (c.next j) j hjk ≫ (desc φ α hα).f j = hα.hom (c.next j) j
state_after: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝¹ : HasHomotopyCofiber φ
inst✝ : DecidableRel c.Rel
α : G ⟶ K
hα : Homotopy (φ ≫ α) 0
j : ι
hjk : c.Rel j (c.next j)
⊢ (inlX φ (c.next j) j hjk ≫
      if hj : c.Rel j (c.next j) then fstX φ j (c.next j) hj ≫ hα.hom (c.next j) j + sndX φ j ≫ α.f j
      else sndX φ j ≫ α.f j) =
    hα.hom (c.next j) j

tactic: rw [dif_pos hjk, comp_add, inlX_fstX_assoc, inlX_sndX_assoc, zero_comp, add_zero]
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
ι : Type u_2
c : ComplexShape ι
F G K : HomologicalComplex C c
φ : F ⟶ G
inst✝¹ : HasHomotopyCofiber φ
inst✝ : DecidableRel c.Rel
α : G ⟶ K
hα : Homotopy (φ ≫ α) 0
j : ι
hjk : c.Rel j (c.next j)
⊢ (inlX φ (c.next j) j hjk ≫
      if hj : c.Rel j (c.next j) then fstX φ j (c.next j) hj ≫ hα.hom (c.next j) j + sndX φ j ≫ α.f j
      else sndX φ j ≫ α.f j) =
    hα.hom (c.next j) j
state_after: no goals
Theorem: LinearOrderedField.inducedMap_add
File: Mathlib/Algebra/Order/CompleteField.lean

tactic: rw [inducedMap, cutMap_add]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : LinearOrderedField α
inst✝² : ConditionallyCompleteLinearOrderedField β
inst✝¹ : ConditionallyCompleteLinearOrderedField γ
inst✝ : Archimedean α
a : α
b : β
q : ℚ
x y : α
⊢ inducedMap α β (x + y) = inducedMap α β x + inducedMap α β y
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : LinearOrderedField α
inst✝² : ConditionallyCompleteLinearOrderedField β
inst✝¹ : ConditionallyCompleteLinearOrderedField γ
inst✝ : Archimedean α
a : α
b : β
q : ℚ
x y : α
⊢ sSup (cutMap β x + cutMap β y) = inducedMap α β x + inducedMap α β y

tactic: exact csSup_add (cutMap_nonempty β x) (cutMap_bddAbove β x) (cutMap_nonempty β y)
  (cutMap_bddAbove β y)
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝³ : LinearOrderedField α
inst✝² : ConditionallyCompleteLinearOrderedField β
inst✝¹ : ConditionallyCompleteLinearOrderedField γ
inst✝ : Archimedean α
a : α
b : β
q : ℚ
x y : α
⊢ sSup (cutMap β x + cutMap β y) = inducedMap α β x + inducedMap α β y
state_after: no goals
Theorem: Nat.add_eq_max_iff
File: Mathlib/Data/Nat/Defs.lean

tactic: omega
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ m + n = max m n ↔ m = 0 ∨ n = 0
state_after: no goals
Theorem: compl_symmDiff
File: Mathlib/Order/SymmDiff.lean

tactic: simp_rw [symmDiff, compl_sup_distrib, compl_sdiff, bihimp, inf_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : BooleanAlgebra α
a b c d : α
⊢ (a ∆ b)ᶜ = a ⇔ b
state_after: no goals
Theorem: Nat.sub_lt_iff_lt_add'
File: Mathlib/Data/Nat/Defs.lean

tactic: omega
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hba : b ≤ a
⊢ a - b < c ↔ a < c + b
state_after: no goals
Theorem: Equiv.Perm.subtypeCongr.symm
File: Mathlib/Logic/Equiv/Basic.lean

tactic: ext x
state_before: ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
⊢ Equiv.symm (ep.subtypeCongr en) = subtypeCongr (Equiv.symm ep) (Equiv.symm en)
state_after: case H
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x

tactic: by_cases h:p x
state_before: case H
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x
state_after: case pos
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : p x
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x

case neg
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : ¬p x
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x

tactic: have : p (ep.symm ⟨x, h⟩) := Subtype.property _
state_before: case pos
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : p x
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x
state_after: case pos
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : p x
this : p ↑((Equiv.symm ep) ⟨x, h⟩)
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x

tactic: simp [Perm.subtypeCongr.apply, h, symm_apply_eq, this]
state_before: case pos
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : p x
this : p ↑((Equiv.symm ep) ⟨x, h⟩)
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x
state_after: no goals

tactic: have : ¬p (en.symm ⟨x, h⟩) := Subtype.property (en.symm _)
state_before: case neg
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : ¬p x
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x
state_after: case neg
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : ¬p x
this : ¬p ↑((Equiv.symm en) ⟨x, h⟩)
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x

tactic: simp [Perm.subtypeCongr.apply, h, symm_apply_eq, this]
state_before: case neg
ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
x : ε
h : ¬p x
this : ¬p ↑((Equiv.symm en) ⟨x, h⟩)
⊢ (Equiv.symm (ep.subtypeCongr en)) x = (subtypeCongr (Equiv.symm ep) (Equiv.symm en)) x
state_after: no goals
Theorem: Lagrange.eval_basisDivisor_right
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: simp only [basisDivisor, eval_mul, eval_C, eval_sub, eval_X, sub_self, mul_zero]
state_before: F : Type u_1
inst✝ : Field F
x y : F
⊢ eval y (basisDivisor x y) = 0
state_after: no goals
Theorem: Mathlib.Tactic.Ring.inv_congr
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R✝ : Type ?u.211595
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : DivisionRing R
a a' b : R
x✝¹ : a = a'
x✝ : a'⁻¹ = b
⊢ a⁻¹ = b
state_after: u : Lean.Level
R✝ : Type ?u.211595
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : DivisionRing R
a' : R
⊢ a'⁻¹ = a'⁻¹

tactic: rfl
state_before: u : Lean.Level
R✝ : Type ?u.211595
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : DivisionRing R
a' : R
⊢ a'⁻¹ = a'⁻¹
state_after: no goals
Theorem: MeasureTheory.setAverage_congr
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: simp only [setAverage_eq, setIntegral_congr_set_ae h, measure_congr h]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f g : α → E
h : s =ᶠ[ae μ] t
⊢ ⨍ (x : α) in s, f x ∂μ = ⨍ (x : α) in t, f x ∂μ
state_after: no goals
Theorem: SetTheory.PGame.birthday_half
File: Mathlib/SetTheory/Surreal/Dyadic.lean

tactic: rw [birthday_def]
state_before: ⊢ (powHalf 1).birthday = 2
state_after: ⊢ max (Ordinal.lsub fun i => ((powHalf 1).moveLeft i).birthday)
      (Ordinal.lsub fun i => ((powHalf 1).moveRight i).birthday) =
    2

tactic: simp
state_before: ⊢ max (Ordinal.lsub fun i => ((powHalf 1).moveLeft i).birthday)
      (Ordinal.lsub fun i => ((powHalf 1).moveRight i).birthday) =
    2
state_after: no goals
Theorem: SimpleGraph.pathGraph_adj
File: Mathlib/Combinatorics/SimpleGraph/Hasse.lean

tactic: simp only [pathGraph, hasse]
state_before: α : Type u_1
β : Type u_2
n : ℕ
u v : Fin n
⊢ (pathGraph n).Adj u v ↔ ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u
state_after: α : Type u_1
β : Type u_2
n : ℕ
u v : Fin n
⊢ u ⋖ v ∨ v ⋖ u ↔ ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u

tactic: simp_rw [← Fin.coe_covBy_iff, Nat.covBy_iff_succ_eq]
state_before: α : Type u_1
β : Type u_2
n : ℕ
u v : Fin n
⊢ u ⋖ v ∨ v ⋖ u ↔ ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u
state_after: no goals
Theorem: LinearMap.trace_eq_matrix_trace_of_finset
File: Mathlib/LinearAlgebra/Trace.lean

tactic: have : ∃ s : Finset M, Nonempty (Basis s R M) := ⟨s, ⟨b⟩⟩
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
⊢ (trace R M) f = ((toMatrix b b) f).trace
state_after: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (trace R M) f = ((toMatrix b b) f).trace

tactic: rw [trace, dif_pos this, ← traceAux_def]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (trace R M) f = ((toMatrix b b) f).trace
state_after: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (traceAux R ⋯.some) f = (traceAux R b) f

tactic: congr 1
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (traceAux R ⋯.some) f = (traceAux R b) f
state_after: case e_a
R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ traceAux R ⋯.some = traceAux R b

tactic: apply traceAux_eq
state_before: case e_a
R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ traceAux R ⋯.some = traceAux R b
state_after: no goals
Theorem: quadraticChar_ne_one
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean

tactic: rcases quadraticChar_exists_neg_one' hF with ⟨a, ha⟩
state_before: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F ≠ 2
⊢ quadraticChar F ≠ 1
state_after: case intro
F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F ≠ 2
a : Fˣ
ha : (quadraticChar F) ↑a = -1
⊢ quadraticChar F ≠ 1

tactic: intro hχ
state_before: case intro
F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F ≠ 2
a : Fˣ
ha : (quadraticChar F) ↑a = -1
⊢ quadraticChar F ≠ 1
state_after: case intro
F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F ≠ 2
a : Fˣ
ha : (quadraticChar F) ↑a = -1
hχ : quadraticChar F = 1
⊢ False

tactic: simp only [hχ, one_apply a.isUnit, eq_neg_self_iff, one_ne_zero] at ha
state_before: case intro
F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F ≠ 2
a : Fˣ
ha : (quadraticChar F) ↑a = -1
hχ : quadraticChar F = 1
⊢ False
state_after: no goals
Theorem: QuotientAddGroup.zmultiples_nsmul_eq_nsmul_iff
File: Mathlib/Algebra/CharZero/Quotient.lean

tactic: rw [← natCast_zsmul ψ, ← natCast_zsmul θ,
  zmultiples_zsmul_eq_zsmul_iff (Int.natCast_ne_zero.mpr hz), Int.cast_natCast]
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
p : R
ψ θ : R ⧸ AddSubgroup.zmultiples p
n : ℕ
hz : n ≠ 0
⊢ n • ψ = n • θ ↔ ∃ k, ψ = θ + ↑k • ↑(p / ↑n)
state_after: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
p : R
ψ θ : R ⧸ AddSubgroup.zmultiples p
n : ℕ
hz : n ≠ 0
⊢ (∃ k, ψ = θ + ↑(↑k • (p / ↑n))) ↔ ∃ k, ψ = θ + ↑k • ↑(p / ↑n)

tactic: rfl
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
p : R
ψ θ : R ⧸ AddSubgroup.zmultiples p
n : ℕ
hz : n ≠ 0
⊢ (∃ k, ψ = θ + ↑(↑k • (p / ↑n))) ↔ ∃ k, ψ = θ + ↑k • ↑(p / ↑n)
state_after: no goals
Theorem: IsBaseChange.lift_eq
File: Mathlib/RingTheory/IsTensorProduct.lean

tactic: have hF : ∀ (s : S) (m : M), h.lift g (s • f m) = s • g m := h.lift_eq _
state_before: R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid N
inst✝¹² : CommSemiring R
inst✝¹¹ : CommSemiring S
inst✝¹⁰ : Algebra R S
inst✝⁹ : Module R M
inst✝⁸ : Module R N
inst✝⁷ : Module S N
inst✝⁶ : IsScalarTower R S N
f : M →ₗ[R] N
h : IsBaseChange S f
P : Type u_2
Q : Type u_3
inst✝⁵ : AddCommMonoid P
inst✝⁴ : Module R P
inst✝³ : AddCommMonoid Q
inst✝² : Module S Q
inst✝¹ : Module R Q
inst✝ : IsScalarTower R S Q
g : M →ₗ[R] Q
x : M
⊢ (h.lift g) (f x) = g x
state_after: R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid N
inst✝¹² : CommSemiring R
inst✝¹¹ : CommSemiring S
inst✝¹⁰ : Algebra R S
inst✝⁹ : Module R M
inst✝⁸ : Module R N
inst✝⁷ : Module S N
inst✝⁶ : IsScalarTower R S N
f : M →ₗ[R] N
h : IsBaseChange S f
P : Type u_2
Q : Type u_3
inst✝⁵ : AddCommMonoid P
inst✝⁴ : Module R P
inst✝³ : AddCommMonoid Q
inst✝² : Module S Q
inst✝¹ : Module R Q
inst✝ : IsScalarTower R S Q
g : M →ₗ[R] Q
x : M
hF : ∀ (s : S) (m : M), (h.lift g) (s • f m) = s • g m
⊢ (h.lift g) (f x) = g x

tactic: convert hF 1 x <;> rw [one_smul]
state_before: R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid N
inst✝¹² : CommSemiring R
inst✝¹¹ : CommSemiring S
inst✝¹⁰ : Algebra R S
inst✝⁹ : Module R M
inst✝⁸ : Module R N
inst✝⁷ : Module S N
inst✝⁶ : IsScalarTower R S N
f : M →ₗ[R] N
h : IsBaseChange S f
P : Type u_2
Q : Type u_3
inst✝⁵ : AddCommMonoid P
inst✝⁴ : Module R P
inst✝³ : AddCommMonoid Q
inst✝² : Module S Q
inst✝¹ : Module R Q
inst✝ : IsScalarTower R S Q
g : M →ₗ[R] Q
x : M
hF : ∀ (s : S) (m : M), (h.lift g) (s • f m) = s • g m
⊢ (h.lift g) (f x) = g x
state_after: no goals