1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.Functor.isEquivalence_of_comp_left
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: rw [isEquivalence_iff_of_iso (G.leftUnitor.symm ≪≫
  isoWhiskerRight F.asEquivalence.counitIso.symm G)]
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u_1
inst✝² : Category.{u_2, u_1} E
F : C ⥤ D
G : D ⥤ E
inst✝¹ : F.IsEquivalence
inst✝ : (F ⋙ G).IsEquivalence
⊢ G.IsEquivalence
state_after: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u_1
inst✝² : Category.{u_2, u_1} E
F : C ⥤ D
G : D ⥤ E
inst✝¹ : F.IsEquivalence
inst✝ : (F ⋙ G).IsEquivalence
⊢ ((F.asEquivalence.inverse ⋙ F.asEquivalence.functor) ⋙ G).IsEquivalence

tactic: exact (F.asEquivalence.symm.trans (F ⋙ G).asEquivalence).isEquivalence_functor
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
E : Type u_1
inst✝² : Category.{u_2, u_1} E
F : C ⥤ D
G : D ⥤ E
inst✝¹ : F.IsEquivalence
inst✝ : (F ⋙ G).IsEquivalence
⊢ ((F.asEquivalence.inverse ⋙ F.asEquivalence.functor) ⋙ G).IsEquivalence
state_after: no goals
Theorem: Sylow.smul_eq_iff_mem_normalizer
File: Mathlib/GroupTheory/Sylow.lean

tactic: rw [eq_comm, SetLike.ext_iff, ← inv_mem_iff (G := G) (H := normalizer P.toSubgroup),
    mem_normalizer_iff, inv_inv]
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
g : G
P : Sylow p G
⊢ g • P = P ↔ g ∈ (↑P).normalizer
state_after: p : ℕ
G : Type u_1
inst✝ : Group G
g : G
P : Sylow p G
⊢ (∀ (x : G), x ∈ P ↔ x ∈ g • P) ↔ ∀ (h : G), h ∈ ↑P ↔ g⁻¹ * h * g ∈ ↑P

tactic: exact
  forall_congr' fun h =>
    iff_congr Iff.rfl
      ⟨fun ⟨a, b, c⟩ => c ▸ by simpa [mul_assoc] using b,
        fun hh => ⟨(MulAut.conj g)⁻¹ h, hh, MulAut.apply_inv_self G (MulAut.conj g) h⟩⟩
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
g : G
P : Sylow p G
⊢ (∀ (x : G), x ∈ P ↔ x ∈ g • P) ↔ ∀ (h : G), h ∈ ↑P ↔ g⁻¹ * h * g ∈ ↑P
state_after: no goals

tactic: simpa [mul_assoc] using b
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
g : G
P : Sylow p G
h : G
x✝ : h ∈ g • P
a : G
b : a ∈ ↑↑P
c : ((MulDistribMulAction.toMonoidEnd (MulAut G) G) (MulAut.conj g)) a = h
⊢ g⁻¹ * ((MulDistribMulAction.toMonoidEnd (MulAut G) G) (MulAut.conj g)) a * g ∈ ↑P
state_after: no goals
Theorem: Set.nonempty_iInter₂
File: Mathlib/Data/Set/Lattice.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : (i : ι) → κ i → Set α
⊢ (⋂ i, ⋂ j, s i j).Nonempty ↔ ∃ a, ∀ (i : ι) (j : κ i), a ∈ s i j
state_after: no goals
Theorem: LinearPMap.supSpanSingleton_apply_mk
File: Mathlib/LinearAlgebra/LinearPMap.lean

tactic: erw [sup_apply _ ⟨x', hx'⟩ ⟨c • x, _⟩, mkSpanSingleton'_apply]
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
K : Type u_5
inst✝² : DivisionRing K
inst✝¹ : Module K E
inst✝ : Module K F
f : E →ₗ.[K] F
x : E
y : F
hx : x ∉ f.domain
x' : E
hx' : x' ∈ f.domain
c : K
⊢ ↑(f.supSpanSingleton x y hx) ⟨x' + c • x, ⋯⟩ = ↑f ⟨x', hx'⟩ + c • y
state_after: case h
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
K : Type u_5
inst✝² : DivisionRing K
inst✝¹ : Module K E
inst✝ : Module K F
f : E →ₗ.[K] F
x : E
y : F
hx : x ∉ f.domain
x' : E
hx' : x' ∈ f.domain
c : K
⊢ c • x ∈ (mkSpanSingleton' x y ⋯).domain

case hz
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
K : Type u_5
inst✝² : DivisionRing K
inst✝¹ : Module K E
inst✝ : Module K F
f : E →ₗ.[K] F
x : E
y : F
hx : x ∉ f.domain
x' : E
hx' : x' ∈ f.domain
c : K
⊢ ↑⟨x', hx'⟩ + ↑⟨c • x, ?h⟩ = ↑⟨x' + c • x, ⋯⟩

tactic: exact mem_span_singleton.2 ⟨c, rfl⟩
state_before: case h
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
K : Type u_5
inst✝² : DivisionRing K
inst✝¹ : Module K E
inst✝ : Module K F
f : E →ₗ.[K] F
x : E
y : F
hx : x ∉ f.domain
x' : E
hx' : x' ∈ f.domain
c : K
⊢ c • x ∈ (mkSpanSingleton' x y ⋯).domain
state_after: no goals

tactic: rfl
state_before: case hz
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
K : Type u_5
inst✝² : DivisionRing K
inst✝¹ : Module K E
inst✝ : Module K F
f : E →ₗ.[K] F
x : E
y : F
hx : x ∉ f.domain
x' : E
hx' : x' ∈ f.domain
c : K
⊢ ↑⟨x', hx'⟩ + ↑⟨c • x, ⋯⟩ = ↑⟨x' + c • x, ⋯⟩
state_after: no goals
Theorem: Finset.supIndep_univ_fin_two
File: Mathlib/Order/SupIndep.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f✝ : ι → α
i : ι
f : Fin 2 → α
⊢ 0 ≠ 1
state_after: no goals
Theorem: DirichletCharacter.primitiveCharacter_isPrimitive
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

tactic: by_cases h : χ.conductor = 0
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
⊢ χ.primitiveCharacter.IsPrimitive
state_after: case pos
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : χ.conductor = 0
⊢ χ.primitiveCharacter.IsPrimitive

case neg
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : ¬χ.conductor = 0
⊢ χ.primitiveCharacter.IsPrimitive

tactic: rw [isPrimitive_def]
state_before: case pos
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : χ.conductor = 0
⊢ χ.primitiveCharacter.IsPrimitive
state_after: case pos
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : χ.conductor = 0
⊢ χ.primitiveCharacter.conductor = χ.conductor

tactic: convert conductor_eq_zero_iff_level_eq_zero.mpr h
state_before: case pos
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : χ.conductor = 0
⊢ χ.primitiveCharacter.conductor = χ.conductor
state_after: no goals

tactic: exact le_antisymm (Nat.le_of_dvd (Nat.pos_of_ne_zero h) (conductor_dvd_level _)) <|
  conductor_le_conductor_mem_conductorSet <| conductor_mem_conductorSet χ
state_before: case neg
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : ¬χ.conductor = 0
⊢ χ.primitiveCharacter.IsPrimitive
state_after: no goals
Theorem: Seminorm.cont_withSeminorms_normedSpace
File: Mathlib/Analysis/LocallyConvex/WithSeminorms.lean

tactic: rw [← Seminorm.isBounded_const (Fin 1)] at hf
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F✝ : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : AddCommGroup E
inst✝¹⁴ : Module 𝕜 E
inst✝¹³ : NormedField 𝕝
inst✝¹² : Module 𝕝 E
inst✝¹¹ : NontriviallyNormedField 𝕜₂
inst✝¹⁰ : AddCommGroup F✝
inst✝⁹ : Module 𝕜₂ F✝
inst✝⁸ : NormedField 𝕝₂
inst✝⁷ : Module 𝕝₂ F✝
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝⁶ : RingHomIsometric σ₁₂
τ₁₂ : 𝕝 →+* 𝕝₂
inst✝⁵ : RingHomIsometric τ₁₂
inst✝⁴ : Nonempty ι
inst✝³ : Nonempty ι'
F : Type u_10
inst✝² : SeminormedAddCommGroup F
inst✝¹ : NormedSpace 𝕝₂ F
inst✝ : TopologicalSpace E
p : ι → Seminorm 𝕝 E
hp : WithSeminorms p
f : E →ₛₗ[τ₁₂] F
hf : ∃ s C, (normSeminorm 𝕝₂ F).comp f ≤ C • s.sup p
⊢ Continuous ⇑f
state_after: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F✝ : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : AddCommGroup E
inst✝¹⁴ : Module 𝕜 E
inst✝¹³ : NormedField 𝕝
inst✝¹² : Module 𝕝 E
inst✝¹¹ : NontriviallyNormedField 𝕜₂
inst✝¹⁰ : AddCommGroup F✝
inst✝⁹ : Module 𝕜₂ F✝
inst✝⁸ : NormedField 𝕝₂
inst✝⁷ : Module 𝕝₂ F✝
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝⁶ : RingHomIsometric σ₁₂
τ₁₂ : 𝕝 →+* 𝕝₂
inst✝⁵ : RingHomIsometric τ₁₂
inst✝⁴ : Nonempty ι
inst✝³ : Nonempty ι'
F : Type u_10
inst✝² : SeminormedAddCommGroup F
inst✝¹ : NormedSpace 𝕝₂ F
inst✝ : TopologicalSpace E
p : ι → Seminorm 𝕝 E
hp : WithSeminorms p
f : E →ₛₗ[τ₁₂] F
hf : IsBounded p (fun x => normSeminorm 𝕝₂ F) f
⊢ Continuous ⇑f

tactic: exact continuous_from_bounded hp (norm_withSeminorms 𝕝₂ F) f hf
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F✝ : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : AddCommGroup E
inst✝¹⁴ : Module 𝕜 E
inst✝¹³ : NormedField 𝕝
inst✝¹² : Module 𝕝 E
inst✝¹¹ : NontriviallyNormedField 𝕜₂
inst✝¹⁰ : AddCommGroup F✝
inst✝⁹ : Module 𝕜₂ F✝
inst✝⁸ : NormedField 𝕝₂
inst✝⁷ : Module 𝕝₂ F✝
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝⁶ : RingHomIsometric σ₁₂
τ₁₂ : 𝕝 →+* 𝕝₂
inst✝⁵ : RingHomIsometric τ₁₂
inst✝⁴ : Nonempty ι
inst✝³ : Nonempty ι'
F : Type u_10
inst✝² : SeminormedAddCommGroup F
inst✝¹ : NormedSpace 𝕝₂ F
inst✝ : TopologicalSpace E
p : ι → Seminorm 𝕝 E
hp : WithSeminorms p
f : E →ₛₗ[τ₁₂] F
hf : IsBounded p (fun x => normSeminorm 𝕝₂ F) f
⊢ Continuous ⇑f
state_after: no goals
Theorem: multiplicity.pow_prime_sub_pow_prime
File: Mathlib/NumberTheory/Multiplicity.lean

tactic: rw [← geom_sum₂_mul, multiplicity.mul hp, geom_sum₂_eq_one hp hp1 hxy hx, add_comm]
state_before: R : Type u_1
n : ℕ
inst✝² : CommRing R
a b x y : R
p : ℕ
inst✝¹ : IsDomain R
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
hp : Prime ↑p
hp1 : Odd p
hxy : ↑p ∣ x - y
hx : ¬↑p ∣ x
⊢ multiplicity (↑p) (x ^ p - y ^ p) = multiplicity (↑p) (x - y) + 1
state_after: no goals
Theorem: Rat.den_div_intCast_eq_one_iff
File: Mathlib/Data/Rat/Lemmas.lean

tactic: replace hn : (n : ℚ) ≠ 0 := num_ne_zero.mp hn
state_before: m n : ℤ
hn : n ≠ 0
⊢ (↑m / ↑n).den = 1 ↔ n ∣ m
state_after: m n : ℤ
hn : ↑n ≠ 0
⊢ (↑m / ↑n).den = 1 ↔ n ∣ m

tactic: constructor
state_before: m n : ℤ
hn : ↑n ≠ 0
⊢ (↑m / ↑n).den = 1 ↔ n ∣ m
state_after: case mp
m n : ℤ
hn : ↑n ≠ 0
⊢ (↑m / ↑n).den = 1 → n ∣ m

case mpr
m n : ℤ
hn : ↑n ≠ 0
⊢ n ∣ m → (↑m / ↑n).den = 1

tactic: rw [Rat.den_eq_one_iff, eq_div_iff hn]
state_before: case mp
m n : ℤ
hn : ↑n ≠ 0
⊢ (↑m / ↑n).den = 1 → n ∣ m
state_after: case mp
m n : ℤ
hn : ↑n ≠ 0
⊢ ↑(↑m / ↑n).num * ↑n = ↑m → n ∣ m

tactic: exact mod_cast (Dvd.intro_left _)
state_before: case mp
m n : ℤ
hn : ↑n ≠ 0
⊢ ↑(↑m / ↑n).num * ↑n = ↑m → n ∣ m
state_after: no goals
Theorem: AEMeasurable.ennreal_tsum
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean

tactic: simp_rw [ENNReal.tsum_eq_iSup_sum]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Sort y
s t u : Set α
inst✝¹ : MeasurableSpace α
ι : Type u_5
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
μ : Measure α
h : ∀ (i : ι), AEMeasurable (f i) μ
⊢ AEMeasurable (fun x => ∑' (i : ι), f i x) μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Sort y
s t u : Set α
inst✝¹ : MeasurableSpace α
ι : Type u_5
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
μ : Measure α
h : ∀ (i : ι), AEMeasurable (f i) μ
⊢ AEMeasurable (fun x => ⨆ s, ∑ i ∈ s, f i x) μ

tactic: apply aemeasurable_iSup
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Sort y
s t u : Set α
inst✝¹ : MeasurableSpace α
ι : Type u_5
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
μ : Measure α
h : ∀ (i : ι), AEMeasurable (f i) μ
⊢ AEMeasurable (fun x => ⨆ s, ∑ i ∈ s, f i x) μ
state_after: case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Sort y
s t u : Set α
inst✝¹ : MeasurableSpace α
ι : Type u_5
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
μ : Measure α
h : ∀ (i : ι), AEMeasurable (f i) μ
⊢ ∀ (i : Finset ι), AEMeasurable (fun b => ∑ i ∈ i, f i b) μ

tactic: exact fun s => Finset.aemeasurable_sum s fun i _ => h i
state_before: case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Sort y
s t u : Set α
inst✝¹ : MeasurableSpace α
ι : Type u_5
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
μ : Measure α
h : ∀ (i : ι), AEMeasurable (f i) μ
⊢ ∀ (i : Finset ι), AEMeasurable (fun b => ∑ i ∈ i, f i b) μ
state_after: no goals
Theorem: TopCat.Presheaf.germ_res_apply
File: Mathlib/Topology/Sheaves/Stalks.lean

tactic: rw [← comp_apply, germ_res]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y Z : TopCat
F : Presheaf C X
U V : Opens ↑X
i : U ⟶ V
x : ↥U
inst✝ : ConcreteCategory C
s : (forget C).obj (F.obj { unop := V })
⊢ (F.germ x) ((F.map i.op) s) = (F.germ ((fun x => ⟨↑x, ⋯⟩) x)) s
state_after: no goals
Theorem: Homeomorph.isClosed_image
File: Mathlib/Topology/Homeomorph.lean

tactic: rw [← preimage_symm, isClosed_preimage]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
h : X ≃ₜ Y
s : Set X
⊢ IsClosed (⇑h '' s) ↔ IsClosed s
state_after: no goals
Theorem: Nat.ModEq.pow
File: Mathlib/Data/Nat/ModEq.lean

tactic: induction m with
| zero => rfl
| succ d hd =>
  rw [Nat.pow_succ, Nat.pow_succ]
  exact hd.mul h
state_before: m✝ n a b c d m : ℕ
h : a ≡ b [MOD n]
⊢ a ^ m ≡ b ^ m [MOD n]
state_after: no goals

tactic: rfl
state_before: case zero
m n a b c d : ℕ
h : a ≡ b [MOD n]
⊢ a ^ 0 ≡ b ^ 0 [MOD n]
state_after: no goals

tactic: rw [Nat.pow_succ, Nat.pow_succ]
state_before: case succ
m n a b c d✝ : ℕ
h : a ≡ b [MOD n]
d : ℕ
hd : a ^ d ≡ b ^ d [MOD n]
⊢ a ^ (d + 1) ≡ b ^ (d + 1) [MOD n]
state_after: case succ
m n a b c d✝ : ℕ
h : a ≡ b [MOD n]
d : ℕ
hd : a ^ d ≡ b ^ d [MOD n]
⊢ a ^ d * a ≡ b ^ d * b [MOD n]

tactic: exact hd.mul h
state_before: case succ
m n a b c d✝ : ℕ
h : a ≡ b [MOD n]
d : ℕ
hd : a ^ d ≡ b ^ d [MOD n]
⊢ a ^ d * a ≡ b ^ d * b [MOD n]
state_after: no goals
Theorem: Multiset.prod_eq_zero_iff
File: Mathlib/Algebra/BigOperators/Ring/Multiset.lean

tactic: rw [quot_mk_to_coe, prod_coe]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CommMonoidWithZero α
s✝ : Multiset α
inst✝¹ : NoZeroDivisors α
inst✝ : Nontrivial α
s : Multiset α
l : List α
⊢ prod ⟦l⟧ = 0 ↔ 0 ∈ ⟦l⟧
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CommMonoidWithZero α
s✝ : Multiset α
inst✝¹ : NoZeroDivisors α
inst✝ : Nontrivial α
s : Multiset α
l : List α
⊢ l.prod = 0 ↔ 0 ∈ ↑l

tactic: exact List.prod_eq_zero_iff
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CommMonoidWithZero α
s✝ : Multiset α
inst✝¹ : NoZeroDivisors α
inst✝ : Nontrivial α
s : Multiset α
l : List α
⊢ l.prod = 0 ↔ 0 ∈ ↑l
state_after: no goals
Theorem: add_pow_expChar
File: Mathlib/Algebra/CharP/ExpChar.lean

tactic: cases' hR with _ _ hprime _
state_before: R : Type u
inst✝ : CommSemiring R
q : ℕ
hR : ExpChar R q
x y : R
⊢ (x + y) ^ q = x ^ q + y ^ q
state_after: case zero
R : Type u
inst✝¹ : CommSemiring R
x y : R
inst✝ : CharZero R
⊢ (x + y) ^ 1 = x ^ 1 + y ^ 1

case prime
R : Type u
inst✝ : CommSemiring R
q : ℕ
x y : R
hprime : Nat.Prime q
hchar✝ : CharP R q
⊢ (x + y) ^ q = x ^ q + y ^ q

tactic: haveI := Fact.mk hprime
state_before: case prime
R : Type u
inst✝ : CommSemiring R
q : ℕ
x y : R
hprime : Nat.Prime q
hchar✝ : CharP R q
⊢ (x + y) ^ q = x ^ q + y ^ q
state_after: case prime
R : Type u
inst✝ : CommSemiring R
q : ℕ
x y : R
hprime : Nat.Prime q
hchar✝ : CharP R q
this : Fact (Nat.Prime q)
⊢ (x + y) ^ q = x ^ q + y ^ q

tactic: exact add_pow_char R x y
state_before: case prime
R : Type u
inst✝ : CommSemiring R
q : ℕ
x y : R
hprime : Nat.Prime q
hchar✝ : CharP R q
this : Fact (Nat.Prime q)
⊢ (x + y) ^ q = x ^ q + y ^ q
state_after: no goals

tactic: simp only [pow_one]
state_before: case zero
R : Type u
inst✝¹ : CommSemiring R
x y : R
inst✝ : CharZero R
⊢ (x + y) ^ 1 = x ^ 1 + y ^ 1
state_after: no goals
Theorem: Multiset.Ico_disjoint_Ico
File: Mathlib/Order/Interval/Multiset.lean

tactic: rw [mem_Ico] at hab hbc
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ a b c d : α
h : b ≤ c
x : α
hab : x ∈ Ico a b
hbc : x ∈ Ico c d
⊢ False
state_after: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ a b c d : α
h : b ≤ c
x : α
hab : a ≤ x ∧ x < b
hbc : c ≤ x ∧ x < d
⊢ False

tactic: exact hab.2.not_le (h.trans hbc.1)
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ a b c d : α
h : b ≤ c
x : α
hab : a ≤ x ∧ x < b
hbc : c ≤ x ∧ x < d
⊢ False
state_after: no goals
Theorem: TypeVec.subtypeVal_toSubtype
File: Mathlib/Data/TypeVec.lean

tactic: ext i x
state_before: n : ℕ
α : TypeVec.{u_1} n
p : α ⟹ repeat n Prop
⊢ subtypeVal p ⊚ toSubtype p = fun x => Subtype.val
state_after: case a.h
n : ℕ
α : TypeVec.{u_1} n
p : α ⟹ repeat n Prop
i : Fin2 n
x : (fun i => { x // ofRepeat (p i x) }) i
⊢ (subtypeVal p ⊚ toSubtype p) i x = ↑x

tactic: induction i <;> dsimp only [toSubtype, comp, subtypeVal] at *
state_before: case a.h
n : ℕ
α : TypeVec.{u_1} n
p : α ⟹ repeat n Prop
i : Fin2 n
x : (fun i => { x // ofRepeat (p i x) }) i
⊢ (subtypeVal p ⊚ toSubtype p) i x = ↑x
state_after: case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ :
  ∀ {α : TypeVec.{u_1} n✝} (p : α ⟹ repeat n✝ Prop) (x : { x // ofRepeat (p a✝ x) }),
    subtypeVal p a✝ (toSubtype p a✝ x) = ↑x
α : TypeVec.{u_1} (n✝ + 1)
p : α ⟹ repeat (n✝ + 1) Prop
x : { x // ofRepeat (p a✝.fs x) }
⊢ subtypeVal (dropFun p) a✝ (toSubtype (dropFun p) a✝ x) = ↑x

tactic: simp [*]
state_before: case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ :
  ∀ {α : TypeVec.{u_1} n✝} (p : α ⟹ repeat n✝ Prop) (x : { x // ofRepeat (p a✝ x) }),
    subtypeVal p a✝ (toSubtype p a✝ x) = ↑x
α : TypeVec.{u_1} (n✝ + 1)
p : α ⟹ repeat (n✝ + 1) Prop
x : { x // ofRepeat (p a✝.fs x) }
⊢ subtypeVal (dropFun p) a✝ (toSubtype (dropFun p) a✝ x) = ↑x
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.rightUnshift_neg
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

tactic: change (rightShiftAddEquiv K L n a n' hn).symm (-γ) = _
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n✝ : ℤ
γ✝ γ₁ γ₂ : Cochain K L n✝
n' a : ℤ
γ : Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n'
n : ℤ
hn : n' + a = n
⊢ (-γ).rightUnshift n hn = -γ.rightUnshift n hn
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n✝ : ℤ
γ✝ γ₁ γ₂ : Cochain K L n✝
n' a : ℤ
γ : Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n'
n : ℤ
hn : n' + a = n
⊢ (rightShiftAddEquiv K L n a n' hn).symm (-γ) = -γ.rightUnshift n hn

tactic: apply _root_.map_neg
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n✝ : ℤ
γ✝ γ₁ γ₂ : Cochain K L n✝
n' a : ℤ
γ : Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n'
n : ℤ
hn : n' + a = n
⊢ (rightShiftAddEquiv K L n a n' hn).symm (-γ) = -γ.rightUnshift n hn
state_after: no goals
Theorem: Finsupp.equivMapDomain_refl
File: Mathlib/Data/Finsupp/Basic.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
l : α →₀ M
⊢ equivMapDomain (Equiv.refl α) l = l
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
l : α →₀ M
x : α
⊢ (equivMapDomain (Equiv.refl α) l) x = l x

tactic: rfl
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
l : α →₀ M
x : α
⊢ (equivMapDomain (Equiv.refl α) l) x = l x
state_after: no goals
Theorem: sdiff_eq_symm
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [← h, sdiff_sdiff_eq_self hy]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
hy : y ≤ x
h : x \ y = z
⊢ x \ z = y
state_after: no goals
Theorem: Vector.toList_map
File: Mathlib/Data/Vector/Basic.lean

tactic: cases v
state_before: n : ℕ
α : Type u_1
β : Type u_2
v : Vector α n
f : α → β
⊢ (map f v).toList = List.map f v.toList
state_after: case mk
n : ℕ
α : Type u_1
β : Type u_2
f : α → β
val✝ : List α
property✝ : val✝.length = n
⊢ (map f ⟨val✝, property✝⟩).toList = List.map f (toList ⟨val✝, property✝⟩)

tactic: rfl
state_before: case mk
n : ℕ
α : Type u_1
β : Type u_2
f : α → β
val✝ : List α
property✝ : val✝.length = n
⊢ (map f ⟨val✝, property✝⟩).toList = List.map f (toList ⟨val✝, property✝⟩)
state_after: no goals
Theorem: Set.insert_image_compl_eq_range
File: Mathlib/Data/Set/Image.lean

tactic: rw [← image_insert_eq, insert_eq, union_compl_self, image_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
f : α → β
x : α
⊢ insert (f x) (f '' {x}ᶜ) = range f
state_after: no goals
Theorem: Nat.nth_eq_zero
File: Mathlib/Data/Nat/Nth.lean

tactic: refine ⟨fun h => ?_, ?_⟩
state_before: p : ℕ → Prop
n : ℕ
⊢ nth p n = 0 ↔ p 0 ∧ n = 0 ∨ ∃ (hf : (setOf p).Finite), hf.toFinset.card ≤ n
state_after: case refine_1
p : ℕ → Prop
n : ℕ
h : nth p n = 0
⊢ p 0 ∧ n = 0 ∨ ∃ (hf : (setOf p).Finite), hf.toFinset.card ≤ n

case refine_2
p : ℕ → Prop
n : ℕ
⊢ (p 0 ∧ n = 0 ∨ ∃ (hf : (setOf p).Finite), hf.toFinset.card ≤ n) → nth p n = 0

tactic: simp only [or_iff_not_imp_right, not_exists, not_le]
state_before: case refine_1
p : ℕ → Prop
n : ℕ
h : nth p n = 0
⊢ p 0 ∧ n = 0 ∨ ∃ (hf : (setOf p).Finite), hf.toFinset.card ≤ n
state_after: case refine_1
p : ℕ → Prop
n : ℕ
h : nth p n = 0
⊢ (∀ (x : (setOf p).Finite), n < x.toFinset.card) → p 0 ∧ n = 0

tactic: exact fun hn => ⟨h ▸ nth_mem _ hn, nonpos_iff_eq_zero.1 <| h ▸ le_nth hn⟩
state_before: case refine_1
p : ℕ → Prop
n : ℕ
h : nth p n = 0
⊢ (∀ (x : (setOf p).Finite), n < x.toFinset.card) → p 0 ∧ n = 0
state_after: no goals

tactic: rintro (⟨h₀, rfl⟩ | ⟨hf, hle⟩)
state_before: case refine_2
p : ℕ → Prop
n : ℕ
⊢ (p 0 ∧ n = 0 ∨ ∃ (hf : (setOf p).Finite), hf.toFinset.card ≤ n) → nth p n = 0
state_after: case refine_2.inl.intro
p : ℕ → Prop
h₀ : p 0
⊢ nth p 0 = 0

case refine_2.inr.intro
p : ℕ → Prop
n : ℕ
hf : (setOf p).Finite
hle : hf.toFinset.card ≤ n
⊢ nth p n = 0

tactic: exacts [nth_zero_of_zero h₀, nth_of_card_le hf hle]
state_before: case refine_2.inl.intro
p : ℕ → Prop
h₀ : p 0
⊢ nth p 0 = 0

case refine_2.inr.intro
p : ℕ → Prop
n : ℕ
hf : (setOf p).Finite
hle : hf.toFinset.card ≤ n
⊢ nth p n = 0
state_after: no goals
Theorem: LowerAdjoint.ext
File: Mathlib/Order/Closure.lean

tactic: congr
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
β : Type u_4
inst✝¹ : Preorder α
inst✝ : Preorder β
u : β → α
l : LowerAdjoint u
l₁ : α → β
gc'✝¹ : GaloisConnection l₁ u
l₂ : α → β
gc'✝ : GaloisConnection l₂ u
h : { toFun := l₁, gc' := gc'✝¹ }.toFun = { toFun := l₂, gc' := gc'✝ }.toFun
⊢ { toFun := l₁, gc' := gc'✝¹ } = { toFun := l₂, gc' := gc'✝ }
state_after: no goals