1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.GrothendieckTopology.isoToPlus_inv
File: Mathlib/CategoryTheory/Sites/Plus.lean

tactic: apply J.plusLift_unique
state_before: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
hP : Presheaf.IsSheaf J P
⊢ (J.isoToPlus P hP).inv = J.plusLift (𝟙 P) hP
state_after: case hγ
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
hP : Presheaf.IsSheaf J P
⊢ J.toPlus P ≫ (J.isoToPlus P hP).inv = 𝟙 P

tactic: rw [Iso.comp_inv_eq, Category.id_comp]
state_before: case hγ
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
hP : Presheaf.IsSheaf J P
⊢ J.toPlus P ≫ (J.isoToPlus P hP).inv = 𝟙 P
state_after: case hγ
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
hP : Presheaf.IsSheaf J P
⊢ J.toPlus P = (J.isoToPlus P hP).hom

tactic: rfl
state_before: case hγ
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
hP : Presheaf.IsSheaf J P
⊢ J.toPlus P = (J.isoToPlus P hP).hom
state_after: no goals
Theorem: CategoryTheory.CommSq.unop
File: Mathlib/CategoryTheory/CommSq.lean

tactic: simp only [← unop_comp, p.w]
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
W✝ X✝ Y✝ Z✝ : C
f✝ : W✝ ⟶ X✝
g✝ : W✝ ⟶ Y✝
h✝ : X✝ ⟶ Z✝
i✝ : Y✝ ⟶ Z✝
W X Y Z : Cᵒᵖ
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
p : CommSq f g h i
⊢ i.unop ≫ g.unop = h.unop ≫ f.unop
state_after: no goals
Theorem: Nat.dvd_iff_dvd_digits_sum
File: Mathlib/Data/Nat/Digits.lean

tactic: rw [← ofDigits_one]
state_before: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ b ∣ n ↔ b ∣ (b'.digits n).sum
state_after: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ b ∣ n ↔ b ∣ ofDigits 1 (b'.digits n)

tactic: conv_lhs => rw [← ofDigits_digits b' n]
state_before: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ b ∣ n ↔ b ∣ ofDigits 1 (b'.digits n)
state_after: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ b ∣ ofDigits b' (b'.digits n) ↔ b ∣ ofDigits 1 (b'.digits n)

tactic: rw [Nat.dvd_iff_mod_eq_zero, Nat.dvd_iff_mod_eq_zero, ofDigits_mod, h]
state_before: n✝ b b' : ℕ
h : b' % b = 1
n : ℕ
⊢ b ∣ ofDigits b' (b'.digits n) ↔ b ∣ ofDigits 1 (b'.digits n)
state_after: no goals
Theorem: groupCohomology.smul_map_inv_sub_map_inv_of_isTwoCocycle
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

tactic: have := hf g g⁻¹ g
state_before: k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A✝ : Rep k G✝
G : Type u_1
A : Type u_2
inst✝² : Group G
inst✝¹ : AddCommGroup A
inst✝ : MulAction G A
f : G × G → A
hf : IsTwoCocycle f
g : G
⊢ g • f (g⁻¹, g) - f (g, g⁻¹) = f (1, 1) - f (g, 1)
state_after: k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A✝ : Rep k G✝
G : Type u_1
A : Type u_2
inst✝² : Group G
inst✝¹ : AddCommGroup A
inst✝ : MulAction G A
f : G × G → A
hf : IsTwoCocycle f
g : G
this : f (g * g⁻¹, g) + f (g, g⁻¹) = g • f (g⁻¹, g) + f (g, g⁻¹ * g)
⊢ g • f (g⁻¹, g) - f (g, g⁻¹) = f (1, 1) - f (g, 1)

tactic: simp only [mul_right_inv, mul_left_inv, map_one_fst_of_isTwoCocycle hf g] at this
state_before: k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A✝ : Rep k G✝
G : Type u_1
A : Type u_2
inst✝² : Group G
inst✝¹ : AddCommGroup A
inst✝ : MulAction G A
f : G × G → A
hf : IsTwoCocycle f
g : G
this : f (g * g⁻¹, g) + f (g, g⁻¹) = g • f (g⁻¹, g) + f (g, g⁻¹ * g)
⊢ g • f (g⁻¹, g) - f (g, g⁻¹) = f (1, 1) - f (g, 1)
state_after: k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A✝ : Rep k G✝
G : Type u_1
A : Type u_2
inst✝² : Group G
inst✝¹ : AddCommGroup A
inst✝ : MulAction G A
f : G × G → A
hf : IsTwoCocycle f
g : G
this : f (1, 1) + f (g, g⁻¹) = g • f (g⁻¹, g) + f (g, 1)
⊢ g • f (g⁻¹, g) - f (g, g⁻¹) = f (1, 1) - f (g, 1)

tactic: exact sub_eq_sub_iff_add_eq_add.2 this.symm
state_before: k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A✝ : Rep k G✝
G : Type u_1
A : Type u_2
inst✝² : Group G
inst✝¹ : AddCommGroup A
inst✝ : MulAction G A
f : G × G → A
hf : IsTwoCocycle f
g : G
this : f (1, 1) + f (g, g⁻¹) = g • f (g⁻¹, g) + f (g, 1)
⊢ g • f (g⁻¹, g) - f (g, g⁻¹) = f (1, 1) - f (g, 1)
state_after: no goals
Theorem: isProperMap_of_comp_of_inj
File: Mathlib/Topology/ProperMap.lean

tactic: refine ⟨hf, fun ℱ y h ↦ ?_⟩
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f✝ : X → Y
g✝ : Y → Z
f : X → Y
g : Y → Z
hf : Continuous f
hg : Continuous g
hgf : IsProperMap (g ∘ f)
g_inj : Injective g
⊢ IsProperMap f
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f✝ : X → Y
g✝ : Y → Z
f : X → Y
g : Y → Z
hf : Continuous f
hg : Continuous g
hgf : IsProperMap (g ∘ f)
g_inj : Injective g
ℱ : Filter X
y : Y
h : MapClusterPt y ℱ f
⊢ ∃ x, f x = y ∧ ClusterPt x ℱ

tactic: rcases hgf.clusterPt_of_mapClusterPt (h.map hg.continuousAt tendsto_map) with ⟨x, hx1, hx2⟩
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f✝ : X → Y
g✝ : Y → Z
f : X → Y
g : Y → Z
hf : Continuous f
hg : Continuous g
hgf : IsProperMap (g ∘ f)
g_inj : Injective g
ℱ : Filter X
y : Y
h : MapClusterPt y ℱ f
⊢ ∃ x, f x = y ∧ ClusterPt x ℱ
state_after: case intro.intro
X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f✝ : X → Y
g✝ : Y → Z
f : X → Y
g : Y → Z
hf : Continuous f
hg : Continuous g
hgf : IsProperMap (g ∘ f)
g_inj : Injective g
ℱ : Filter X
y : Y
h : MapClusterPt y ℱ f
x : X
hx1 : (g ∘ f) x = g y
hx2 : ClusterPt x ℱ
⊢ ∃ x, f x = y ∧ ClusterPt x ℱ

tactic: exact ⟨x, g_inj hx1, hx2⟩
state_before: case intro.intro
X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f✝ : X → Y
g✝ : Y → Z
f : X → Y
g : Y → Z
hf : Continuous f
hg : Continuous g
hgf : IsProperMap (g ∘ f)
g_inj : Injective g
ℱ : Filter X
y : Y
h : MapClusterPt y ℱ f
x : X
hx1 : (g ∘ f) x = g y
hx2 : ClusterPt x ℱ
⊢ ∃ x, f x = y ∧ ClusterPt x ℱ
state_after: no goals
Theorem: Ordnode.dual_node4L
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: cases m <;> simp [node4L, node4R, node3R, dual_node3L, dual_node', add_comm]
state_before: α : Type u_1
l : Ordnode α
x : α
m : Ordnode α
y : α
r : Ordnode α
⊢ (l.node4L x m y r).dual = r.dual.node4R y m.dual x l.dual
state_after: no goals
Theorem: Polynomial.card_roots'
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: by_cases hp0 : p = 0
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
⊢ Multiset.card p.roots ≤ p.natDegree
state_after: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp0 : p = 0
⊢ Multiset.card p.roots ≤ p.natDegree

case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp0 : ¬p = 0
⊢ Multiset.card p.roots ≤ p.natDegree

tactic: exact WithBot.coe_le_coe.1 (le_trans (card_roots hp0) (le_of_eq <| degree_eq_natDegree hp0))
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp0 : ¬p = 0
⊢ Multiset.card p.roots ≤ p.natDegree
state_after: no goals

tactic: simp [hp0]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp0 : p = 0
⊢ Multiset.card p.roots ≤ p.natDegree
state_after: no goals
Theorem: csSup_mem_of_not_isSuccLimit'
File: Mathlib/Order/SuccPred/CompleteLinearOrder.lean

tactic: obtain (rfl|hs) := s.eq_empty_or_nonempty
state_before: ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
⊢ sSup s ∈ s
state_after: case inl
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
x : α
hbdd : BddAbove ∅
hlim : ¬IsSuccLimit (sSup ∅)
⊢ sSup ∅ ∈ ∅

case inr
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
hs : s.Nonempty
⊢ sSup s ∈ s

tactic: simp [isSuccLimit_bot] at hlim
state_before: case inl
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
x : α
hbdd : BddAbove ∅
hlim : ¬IsSuccLimit (sSup ∅)
⊢ sSup ∅ ∈ ∅
state_after: no goals

tactic: exact csSup_mem_of_not_isSuccLimit hs hbdd hlim
state_before: case inr
ι : Type u_1
α : Type u_2
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
s : Set α
x : α
hbdd : BddAbove s
hlim : ¬IsSuccLimit (sSup s)
hs : s.Nonempty
⊢ sSup s ∈ s
state_after: no goals
Theorem: Asymptotics.IsBigOWith.sub_isLittleO
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simpa only [sub_eq_add_neg] using h₁.add_isLittleO h₂.neg_left hc
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
f₁ f₂ : α → E'
g₁ g₂ : α → F'
h₁ : IsBigOWith c₁ l f₁ g
h₂ : f₂ =o[l] g
hc : c₁ < c₂
⊢ IsBigOWith c₂ l (fun x => f₁ x - f₂ x) g
state_after: no goals
Theorem: natCast_le_rank_iff_finset
File: Mathlib/LinearAlgebra/Dimension/Finite.lean

tactic: simpa [h₁] using h₂.cardinal_le_rank
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι : Type w
inst✝⁷ : Ring R
inst✝⁶ : AddCommGroup M
inst✝⁵ : AddCommGroup M'
inst✝⁴ : AddCommGroup M₁
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M₁
inst✝ : StrongRankCondition R
n : ℕ
x✝ : ∃ s, s.card = n ∧ LinearIndependent R Subtype.val
s : Finset M
h₁ : s.card = n
h₂ : LinearIndependent R Subtype.val
⊢ ↑n ≤ Module.rank R M
state_after: no goals
Theorem: Fin.prod_congr'
File: Mathlib/Algebra/BigOperators/Fin.lean

tactic: subst h
state_before: α : Type u_1
β : Type u_2
M : Type u_3
inst✝ : CommMonoid M
a b : ℕ
f : Fin b → M
h : a = b
⊢ ∏ i : Fin a, f (cast h i) = ∏ i : Fin b, f i
state_after: α : Type u_1
β : Type u_2
M : Type u_3
inst✝ : CommMonoid M
a : ℕ
f : Fin a → M
⊢ ∏ i : Fin a, f (cast ⋯ i) = ∏ i : Fin a, f i

tactic: congr
state_before: α : Type u_1
β : Type u_2
M : Type u_3
inst✝ : CommMonoid M
a : ℕ
f : Fin a → M
⊢ ∏ i : Fin a, f (cast ⋯ i) = ∏ i : Fin a, f i
state_after: no goals
Theorem: LinearPMap.inverse_graph
File: Mathlib/LinearAlgebra/LinearPMap.lean

tactic: rw [inverse, Submodule.toLinearPMap_graph_eq _ (mem_inverse_graph_snd_eq_zero hf)]
state_before: R : Type u_1
inst✝⁶ : Ring R
E : Type u_2
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_3
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type u_4
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
⊢ f.inverse.graph = Submodule.map (LinearEquiv.prodComm R E F) f.graph
state_after: no goals
Theorem: hyperoperation_ge_four_zero
File: Mathlib/Data/Nat/Hyperoperation.lean

tactic: induction' k with kk kih
state_before: n k : ℕ
⊢ hyperoperation (n + 4) 0 k = if Even k then 1 else 0
state_after: case zero
n : ℕ
⊢ hyperoperation (n + 4) 0 0 = if Even 0 then 1 else 0

case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 4) 0 (kk + 1) = if Even (kk + 1) then 1 else 0

tactic: rw [hyperoperation_ge_three_eq_one]
state_before: case zero
n : ℕ
⊢ hyperoperation (n + 4) 0 0 = if Even 0 then 1 else 0
state_after: case zero
n : ℕ
⊢ 1 = if Even 0 then 1 else 0

tactic: simp only [Nat.zero_eq, even_zero, if_true]
state_before: case zero
n : ℕ
⊢ 1 = if Even 0 then 1 else 0
state_after: no goals

tactic: rw [hyperoperation_recursion]
state_before: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 4) 0 (kk + 1) = if Even (kk + 1) then 1 else 0
state_after: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 3) 0 (hyperoperation (n + 3 + 1) 0 kk) = if Even (kk + 1) then 1 else 0

tactic: rw [kih]
state_before: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 3) 0 (hyperoperation (n + 3 + 1) 0 kk) = if Even (kk + 1) then 1 else 0
state_after: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 3) 0 (if Even kk then 1 else 0) = if Even (kk + 1) then 1 else 0

tactic: simp_rw [Nat.even_add_one]
state_before: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 3) 0 (if Even kk then 1 else 0) = if Even (kk + 1) then 1 else 0
state_after: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 3) 0 (if Even kk then 1 else 0) = if ¬Even kk then 1 else 0

tactic: split_ifs
state_before: case succ
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
⊢ hyperoperation (n + 3) 0 (if Even kk then 1 else 0) = if ¬Even kk then 1 else 0
state_after: case pos
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
h✝ : Even kk
⊢ hyperoperation (n + 3) 0 1 = 0

case neg
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
h✝ : ¬Even kk
⊢ hyperoperation (n + 3) 0 0 = 1

tactic: exact hyperoperation_ge_two_eq_self (n + 1) 0
state_before: case pos
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
h✝ : Even kk
⊢ hyperoperation (n + 3) 0 1 = 0
state_after: no goals

tactic: exact hyperoperation_ge_three_eq_one n 0
state_before: case neg
n kk : ℕ
kih : hyperoperation (n + 4) 0 kk = if Even kk then 1 else 0
h✝ : ¬Even kk
⊢ hyperoperation (n + 3) 0 0 = 1
state_after: no goals
Theorem: RingQuot.mkAlgHom_surjective
File: Mathlib/Algebra/RingQuot.lean

tactic: suffices Function.Surjective fun x ↦ (⟨.mk (Rel s) x⟩ : RingQuot s) by
  simpa [mkAlgHom_def, mkRingHom_def]
state_before: R : Type uR
inst✝⁴ : Semiring R
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Semiring T
s : A → A → Prop
⊢ Function.Surjective ⇑(mkAlgHom S s)
state_after: R : Type uR
inst✝⁴ : Semiring R
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Semiring T
s : A → A → Prop
⊢ Function.Surjective fun x => { toQuot := Quot.mk (Rel s) x }

tactic: rintro ⟨⟨a⟩⟩
state_before: R : Type uR
inst✝⁴ : Semiring R
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Semiring T
s : A → A → Prop
⊢ Function.Surjective fun x => { toQuot := Quot.mk (Rel s) x }
state_after: case mk.mk
R : Type uR
inst✝⁴ : Semiring R
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Semiring T
s : A → A → Prop
toQuot✝ : Quot (Rel s)
a : A
⊢ ∃ a_1, (fun x => { toQuot := Quot.mk (Rel s) x }) a_1 = { toQuot := Quot.mk (Rel s) a }

tactic: use a
state_before: case mk.mk
R : Type uR
inst✝⁴ : Semiring R
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Semiring T
s : A → A → Prop
toQuot✝ : Quot (Rel s)
a : A
⊢ ∃ a_1, (fun x => { toQuot := Quot.mk (Rel s) x }) a_1 = { toQuot := Quot.mk (Rel s) a }
state_after: no goals

tactic: simpa [mkAlgHom_def, mkRingHom_def]
state_before: R : Type uR
inst✝⁴ : Semiring R
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Semiring T
s : A → A → Prop
this : Function.Surjective fun x => { toQuot := Quot.mk (Rel s) x }
⊢ Function.Surjective ⇑(mkAlgHom S s)
state_after: no goals
Theorem: Matrix.IsAdjMatrix.toGraph_compl_eq
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: ext v w
state_before: V : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : DecidableEq α
inst✝² : DecidableEq V
A : Matrix V V α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
h : A.IsAdjMatrix
⊢ ⋯.toGraph = h.toGraphᶜ
state_after: case Adj.h.h.a
V : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : DecidableEq α
inst✝² : DecidableEq V
A : Matrix V V α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
h : A.IsAdjMatrix
v w : V
⊢ ⋯.toGraph.Adj v w ↔ h.toGraphᶜ.Adj v w

tactic: cases' h.zero_or_one v w with h h <;> by_cases hvw : v = w <;> simp [Matrix.compl, h, hvw]
state_before: case Adj.h.h.a
V : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : DecidableEq α
inst✝² : DecidableEq V
A : Matrix V V α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
h : A.IsAdjMatrix
v w : V
⊢ ⋯.toGraph.Adj v w ↔ h.toGraphᶜ.Adj v w
state_after: no goals
Theorem: Submodule.subsingleton_iff_eq_bot
File: Mathlib/Algebra/Module/Submodule/Lattice.lean

tactic: rw [subsingleton_iff, Submodule.eq_bot_iff]
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
⊢ Subsingleton ↥p ↔ p = ⊥
state_after: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
⊢ (∀ (x y : ↥p), x = y) ↔ ∀ x ∈ p, x = 0

tactic: refine ⟨fun h x hx ↦ by simpa using h ⟨x, hx⟩ ⟨0, p.zero_mem⟩,
  fun h ⟨x, hx⟩ ⟨y, hy⟩ ↦ by simp [h x hx, h y hy]⟩
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
⊢ (∀ (x y : ↥p), x = y) ↔ ∀ x ∈ p, x = 0
state_after: no goals

tactic: simpa using h ⟨x, hx⟩ ⟨0, p.zero_mem⟩
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
h : ∀ (x y : ↥p), x = y
x : M
hx : x ∈ p
⊢ x = 0
state_after: no goals

tactic: simp [h x hx, h y hy]
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : SMul S R
inst✝ : IsScalarTower S R M
p q : Submodule R M
h : ∀ x ∈ p, x = 0
x✝¹ x✝ : ↥p
x : M
hx : x ∈ p
y : M
hy : y ∈ p
⊢ ⟨x, hx⟩ = ⟨y, hy⟩
state_after: no goals
Theorem: Vector.mapAccumr₂_eq_map₂_of_constant_state
File: Mathlib/Data/Vector/MapLemmas.lean

tactic: induction xs, ys using revInductionOn₂ <;> simp_all
state_before: α : Type
n : ℕ
β : Type
xs : Vector α n
ys : Vector β n
σ γ : Type
f : α → β → σ → σ × γ
s : σ
h : ∀ (a : α) (b : β), (f a b s).1 = s
⊢ mapAccumr₂ f xs ys s = (s, map₂ (fun x y => (f x y s).2) xs ys)
state_after: no goals
Theorem: Dioph.sub_dioph
File: Mathlib/NumberTheory/Dioph.lean

tactic: rcases o with (ae | ⟨yz, x0⟩)
state_before: α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
x y z : ℕ
o : y = x + z ∨ y ≤ z ∧ x = 0
⊢ y - z = x
state_after: case inl
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
x y z : ℕ
ae : y = x + z
⊢ y - z = x

case inr.intro
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
x y z : ℕ
yz : y ≤ z
x0 : x = 0
⊢ y - z = x

tactic: rw [ae, add_tsub_cancel_right]
state_before: case inl
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
x y z : ℕ
ae : y = x + z
⊢ y - z = x
state_after: no goals

tactic: rw [x0, tsub_eq_zero_iff_le.mpr yz]
state_before: case inr.intro
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
x y z : ℕ
yz : y ≤ z
x0 : x = 0
⊢ y - z = x
state_after: no goals

tactic: rintro rfl
state_before: α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
x y z : ℕ
⊢ y - z = x → y = x + z ∨ y ≤ z ∧ x = 0
state_after: α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
y z : ℕ
⊢ y = y - z + z ∨ y ≤ z ∧ y - z = 0

tactic: rcases le_total y z with yz | zy
state_before: α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
y z : ℕ
⊢ y = y - z + z ∨ y ≤ z ∧ y - z = 0
state_after: case inl
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
y z : ℕ
yz : y ≤ z
⊢ y = y - z + z ∨ y ≤ z ∧ y - z = 0

case inr
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
y z : ℕ
zy : z ≤ y
⊢ y = y - z + z ∨ y ≤ z ∧ y - z = 0

tactic: exact Or.inr ⟨yz, tsub_eq_zero_iff_le.mpr yz⟩
state_before: case inl
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
y z : ℕ
yz : y ≤ z
⊢ y = y - z + z ∨ y ≤ z ∧ y - z = 0
state_after: no goals

tactic: exact Or.inl (tsub_add_cancel_of_le zy).symm
state_before: case inr
α β : Type
n : ℕ
f g : (α → ℕ) → ℕ
df : DiophFn f
dg : DiophFn g
y z : ℕ
zy : z ≤ y
⊢ y = y - z + z ∨ y ≤ z ∧ y - z = 0
state_after: no goals
Theorem: Ideal.pow_sup_eq_top
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [← Finset.card_range n, ← Finset.prod_const]
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
n : ℕ
h : I ⊔ J = ⊤
⊢ I ^ n ⊔ J = ⊤
state_after: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
n : ℕ
h : I ⊔ J = ⊤
⊢ (∏ _x ∈ Finset.range n, I) ⊔ J = ⊤

tactic: exact prod_sup_eq_top fun _ _ => h
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
n : ℕ
h : I ⊔ J = ⊤
⊢ (∏ _x ∈ Finset.range n, I) ⊔ J = ⊤
state_after: no goals
Theorem: Multiset.one_le_prod_of_one_le
File: Mathlib/Algebra/Order/BigOperators/Group/Multiset.lean

tactic: simpa using List.one_le_prod_of_one_le hl
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : OrderedCommMonoid α
s t : Multiset α
a : α
l : List α
hl : ∀ x ∈ ⟦l⟧, 1 ≤ x
⊢ 1 ≤ prod ⟦l⟧
state_after: no goals
Theorem: CategoryTheory.isSheaf_yoneda'
File: Mathlib/CategoryTheory/Sites/Types.lean

tactic: convert congr_fun (hx (𝟙 _) (fun _ => z) (hs <| f z) h rfl) PUnit.unit using 1
state_before: α β : Type u
S : Sieve β
hs : S ∈ typesGrothendieckTopology.sieves β
x : FamilyOfElements (yoneda.obj α) S.arrows
hx : x.Compatible
γ : Type u
f : γ ⟶ β
h : S.arrows f
z : { unop := γ }.unop
⊢ (yoneda.obj α).map f.op (fun y => x (fun x => y) ⋯ PUnit.unit) z = x f h z
state_after: no goals

tactic: convert congr_fun (hf _ (hs y)) PUnit.unit
state_before: α β : Type u
S : Sieve β
hs : S ∈ typesGrothendieckTopology.sieves β
x : FamilyOfElements (yoneda.obj α) S.arrows
hx : x.Compatible
f : (yoneda.obj α).obj { unop := β }
hf : (fun t => x.IsAmalgamation t) f
y : { unop := β }.unop
⊢ f y = x (fun x => y) ⋯ PUnit.unit
state_after: no goals