1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Sum.lex_acc_inl
File: .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean

tactic: induction aca with
| intro _ _ IH =>
  constructor
  intro y h
  cases h with
  | inl h' => exact IH _ h'
state_before: α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
aca : Acc r a
⊢ Acc (Lex r s) (inl a)
state_after: no goals

tactic: constructor
state_before: case intro
α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
x✝ : α✝
h✝ : ∀ (y : α✝), r y x✝ → Acc r y
IH : ∀ (y : α✝), r y x✝ → Acc (Lex r s) (inl y)
⊢ Acc (Lex r s) (inl x✝)
state_after: case intro.h
α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
x✝ : α✝
h✝ : ∀ (y : α✝), r y x✝ → Acc r y
IH : ∀ (y : α✝), r y x✝ → Acc (Lex r s) (inl y)
⊢ ∀ (y : α✝ ⊕ β✝), Lex r s y (inl x✝) → Acc (Lex r s) y

tactic: intro y h
state_before: case intro.h
α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
x✝ : α✝
h✝ : ∀ (y : α✝), r y x✝ → Acc r y
IH : ∀ (y : α✝), r y x✝ → Acc (Lex r s) (inl y)
⊢ ∀ (y : α✝ ⊕ β✝), Lex r s y (inl x✝) → Acc (Lex r s) y
state_after: case intro.h
α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
x✝ : α✝
h✝ : ∀ (y : α✝), r y x✝ → Acc r y
IH : ∀ (y : α✝), r y x✝ → Acc (Lex r s) (inl y)
y : α✝ ⊕ β✝
h : Lex r s y (inl x✝)
⊢ Acc (Lex r s) y

tactic: cases h with
| inl h' => exact IH _ h'
state_before: case intro.h
α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
x✝ : α✝
h✝ : ∀ (y : α✝), r y x✝ → Acc r y
IH : ∀ (y : α✝), r y x✝ → Acc (Lex r s) (inl y)
y : α✝ ⊕ β✝
h : Lex r s y (inl x✝)
⊢ Acc (Lex r s) y
state_after: no goals

tactic: exact IH _ h'
state_before: case intro.h.inl
α✝ : Type u_1
r : α✝ → α✝ → Prop
a : α✝
β✝ : Type u_2
s : β✝ → β✝ → Prop
x✝ : α✝
h✝ : ∀ (y : α✝), r y x✝ → Acc r y
IH : ∀ (y : α✝), r y x✝ → Acc (Lex r s) (inl y)
a₁✝ : α✝
h' : r a₁✝ x✝
⊢ Acc (Lex r s) (inl a₁✝)
state_after: no goals
Theorem: MeasureTheory.lintegral_edist_triangle
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [← lintegral_add_left' (hf.edist hh)]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g h : α → β
hf : AEStronglyMeasurable f μ
hh : AEStronglyMeasurable h μ
⊢ ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g h : α → β
hf : AEStronglyMeasurable f μ
hh : AEStronglyMeasurable h μ
⊢ ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist (g a) (h a) ∂μ

tactic: refine lintegral_mono fun a => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g h : α → β
hf : AEStronglyMeasurable f μ
hh : AEStronglyMeasurable h μ
⊢ ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist (g a) (h a) ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g h : α → β
hf : AEStronglyMeasurable f μ
hh : AEStronglyMeasurable h μ
a : α
⊢ edist (f a) (g a) ≤ edist (f a) (h a) + edist (g a) (h a)

tactic: apply edist_triangle_right
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g h : α → β
hf : AEStronglyMeasurable f μ
hh : AEStronglyMeasurable h μ
a : α
⊢ edist (f a) (g a) ≤ edist (f a) (h a) + edist (g a) (h a)
state_after: no goals
Theorem: NumberField.Units.coe_pow
File: Mathlib/NumberTheory/NumberField/Units/Basic.lean

tactic: rw [← map_pow, ← val_pow_eq_pow_val]
state_before: K : Type u_1
inst✝ : Field K
x : (𝓞 K)ˣ
n : ℕ
⊢ (algebraMap (𝓞 K) K) ↑(x ^ n) = (algebraMap (𝓞 K) K) ↑x ^ n
state_after: no goals
Theorem: DiscreteQuotient.ofLE_ofLE
File: Mathlib/Topology/DiscreteQuotient.lean

tactic: rcases x with ⟨⟩
state_before: α : Type u_1
X : Type u_2
Y : Type u_3
Z : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S A B C : DiscreteQuotient X
h₁ : A ≤ B
h₂ : B ≤ C
x : Quotient A.toSetoid
⊢ ofLE h₂ (ofLE h₁ x) = ofLE ⋯ x
state_after: case mk
α : Type u_1
X : Type u_2
Y : Type u_3
Z : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S A B C : DiscreteQuotient X
h₁ : A ≤ B
h₂ : B ≤ C
x : Quotient A.toSetoid
a✝ : X
⊢ ofLE h₂ (ofLE h₁ (Quot.mk Setoid.r a✝)) = ofLE ⋯ (Quot.mk Setoid.r a✝)

tactic: rfl
state_before: case mk
α : Type u_1
X : Type u_2
Y : Type u_3
Z : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S A B C : DiscreteQuotient X
h₁ : A ≤ B
h₂ : B ≤ C
x : Quotient A.toSetoid
a✝ : X
⊢ ofLE h₂ (ofLE h₁ (Quot.mk Setoid.r a✝)) = ofLE ⋯ (Quot.mk Setoid.r a✝)
state_after: no goals
Theorem: Composition.sizeUpTo_succ
File: Mathlib/Combinatorics/Enumerative/Composition.lean

tactic: simp only [sizeUpTo]
state_before: n : ℕ
c : Composition n
i : ℕ
h : i < c.length
⊢ c.sizeUpTo (i + 1) = c.sizeUpTo i + c.blocks[i]
state_after: n : ℕ
c : Composition n
i : ℕ
h : i < c.length
⊢ (take (i + 1) c.blocks).sum = (take i c.blocks).sum + c.blocks[i]

tactic: rw [sum_take_succ _ _ h]
state_before: n : ℕ
c : Composition n
i : ℕ
h : i < c.length
⊢ (take (i + 1) c.blocks).sum = (take i c.blocks).sum + c.blocks[i]
state_after: no goals
Theorem: MvPolynomial.map_map
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: congr
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
⊢ eval₂ ((map g).comp (C.comp f)) (⇑(map g) ∘ X) p = (map (g.comp f)) p
state_after: case e_f
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
⊢ (map g).comp (C.comp f) = C.comp (g.comp f)

case e_g
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
⊢ ⇑(map g) ∘ X = X

tactic: ext1 a
state_before: case e_f
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
⊢ (map g).comp (C.comp f) = C.comp (g.comp f)
state_after: case e_f.a
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
a : R
⊢ ((map g).comp (C.comp f)) a = (C.comp (g.comp f)) a

tactic: simp only [map_C, comp_apply, RingHom.coe_comp]
state_before: case e_f.a
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a✝ a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
a : R
⊢ ((map g).comp (C.comp f)) a = (C.comp (g.comp f)) a
state_after: no goals

tactic: ext1 n
state_before: case e_g
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
⊢ ⇑(map g) ∘ X = X
state_after: case e_g.h
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
n : σ
⊢ (⇑(map g) ∘ X) n = X n

tactic: simp only [map_X, comp_apply]
state_before: case e_g.h
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
f : R →+* S₁
inst✝ : CommSemiring S₂
g : S₁ →+* S₂
p : MvPolynomial σ R
n : σ
⊢ (⇑(map g) ∘ X) n = X n
state_after: no goals
Theorem: Submodule.disjoint_def
File: Mathlib/Algebra/Module/Submodule/Lattice.lean

tactic: simp
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 p p' : Submodule R M
⊢ (∀ (x : M), x ∈ p ∧ x ∈ p' → x ∈ {0}) ↔ ∀ x ∈ p, x ∈ p' → x = 0
state_after: no goals
Theorem: Set.biInter_and
File: Mathlib/Data/Set/Lattice.lean

tactic: simp only [iInter_and, @iInter_comm _ ι']
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
p : ι → Prop
q : ι → ι' → Prop
s : (x : ι) → (y : ι') → p x ∧ q x y → Set α
⊢ ⋂ x, ⋂ y, ⋂ (h : p x ∧ q x y), s x y h = ⋂ x, ⋂ (hx : p x), ⋂ y, ⋂ (hy : q x y), s x y ⋯
state_after: no goals
Theorem: LieAlgebra.InvariantForm.restrict_nondegenerate
File: Mathlib/Algebra/Lie/InvariantForm.lean

tactic: rw [LinearMap.BilinForm.restrict_nondegenerate_iff_isCompl_orthogonal hΦ_refl]
state_before: K : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : Field K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra K L
inst✝³ : AddCommGroup M
inst✝² : Module K M
inst✝¹ : LieRingModule L M
inst✝ : Module.Finite K L
Φ : LinearMap.BilinForm K L
hΦ_nondeg : Φ.Nondegenerate
hΦ_inv : LinearMap.BilinForm.lieInvariant L Φ
hΦ_refl : Φ.IsRefl
hL : ∀ (I : LieIdeal K L), IsAtom I → ¬IsLieAbelian ↥↑I
I : LieIdeal K L
hI : IsAtom I
⊢ (Φ.restrict (lieIdealSubalgebra K L I).toSubmodule).Nondegenerate
state_after: K : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : Field K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra K L
inst✝³ : AddCommGroup M
inst✝² : Module K M
inst✝¹ : LieRingModule L M
inst✝ : Module.Finite K L
Φ : LinearMap.BilinForm K L
hΦ_nondeg : Φ.Nondegenerate
hΦ_inv : LinearMap.BilinForm.lieInvariant L Φ
hΦ_refl : Φ.IsRefl
hL : ∀ (I : LieIdeal K L), IsAtom I → ¬IsLieAbelian ↥↑I
I : LieIdeal K L
hI : IsAtom I
⊢ IsCompl (lieIdealSubalgebra K L I).toSubmodule (Φ.orthogonal (lieIdealSubalgebra K L I).toSubmodule)

tactic: exact orthogonal_isCompl_coe_submodule Φ hΦ_nondeg hΦ_inv hΦ_refl hL I hI
state_before: K : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : Field K
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra K L
inst✝³ : AddCommGroup M
inst✝² : Module K M
inst✝¹ : LieRingModule L M
inst✝ : Module.Finite K L
Φ : LinearMap.BilinForm K L
hΦ_nondeg : Φ.Nondegenerate
hΦ_inv : LinearMap.BilinForm.lieInvariant L Φ
hΦ_refl : Φ.IsRefl
hL : ∀ (I : LieIdeal K L), IsAtom I → ¬IsLieAbelian ↥↑I
I : LieIdeal K L
hI : IsAtom I
⊢ IsCompl (lieIdealSubalgebra K L I).toSubmodule (Φ.orthogonal (lieIdealSubalgebra K L I).toSubmodule)
state_after: no goals
Theorem: uniformInducing_of_compose
File: Mathlib/Topology/UniformSpace/UniformEmbedding.lean

tactic: refine ⟨le_antisymm ?_ hf.le_comap⟩
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
g : β → γ
hf : UniformContinuous f
hg : UniformContinuous g
hgf : UniformInducing (g ∘ f)
⊢ UniformInducing f
state_after: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
g : β → γ
hf : UniformContinuous f
hg : UniformContinuous g
hgf : UniformInducing (g ∘ f)
⊢ comap (fun x => (f x.1, f x.2)) (𝓤 β) ≤ 𝓤 α

tactic: rw [← hgf.1, ← Prod.map_def, ← Prod.map_def, ← Prod.map_comp_map f f g g, ← comap_comap]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
g : β → γ
hf : UniformContinuous f
hg : UniformContinuous g
hgf : UniformInducing (g ∘ f)
⊢ comap (fun x => (f x.1, f x.2)) (𝓤 β) ≤ 𝓤 α
state_after: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
g : β → γ
hf : UniformContinuous f
hg : UniformContinuous g
hgf : UniformInducing (g ∘ f)
⊢ comap (Prod.map f f) (𝓤 β) ≤ comap (Prod.map f f) (comap (Prod.map g g) (𝓤 γ))

tactic: exact comap_mono hg.le_comap
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
g : β → γ
hf : UniformContinuous f
hg : UniformContinuous g
hgf : UniformInducing (g ∘ f)
⊢ comap (Prod.map f f) (𝓤 β) ≤ comap (Prod.map f f) (comap (Prod.map g g) (𝓤 γ))
state_after: no goals
Theorem: IntermediateField.normal_iff_forall_fieldRange_le
File: Mathlib/FieldTheory/NormalClosure.lean

tactic: rw [normal_iff_normalClosure_le, normalClosure_def, iSup_le_iff]
state_before: F : Type u_1
K✝¹ : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K✝¹
inst✝³ : Field L
inst✝² : Algebra F K✝¹
inst✝¹ : Algebra F L
K✝ K' : IntermediateField F L
inst✝ : Normal F L
K : IntermediateField F L
⊢ Normal F ↥K ↔ ∀ (σ : ↥K →ₐ[F] L), σ.fieldRange ≤ K
state_after: no goals
Theorem: Finsupp.single_apply
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
simp_rw [@eq_comm _ a a']
convert Pi.single_apply a b a'
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
a a' : α
b : M
inst✝ : Decidable (a = a')
⊢ (single a b) a' = if a = a' then b else 0
state_after: no goals

tactic: simp_rw [@eq_comm _ a a']
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
a a' : α
b : M
inst✝ : Decidable (a = a')
⊢ (single a b) a' = if a = a' then b else 0
state_after: α : 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
a a' : α
b : M
inst✝ : Decidable (a = a')
⊢ (single a b) a' = if a' = a then b else 0

tactic: convert Pi.single_apply a b a'
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
a a' : α
b : M
inst✝ : Decidable (a = a')
⊢ (single a b) a' = if a' = a then b else 0
state_after: no goals
Theorem: AlgebraicGeometry.StructureSheaf.toOpen_germ
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: rw [← toOpen_res R ⊤ U (homOfLE le_top : U ⟶ ⊤), Category.assoc, Presheaf.germ_res]
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : ↥U
⊢ toOpen R U ≫ (structureSheaf R).presheaf.germ x = toStalk R ↑x
state_after: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : ↥U
⊢ toOpen R ⊤ ≫ germ (structureSheaf R).val ((fun x => ⟨↑x, ⋯⟩) x) = toStalk R ↑x

tactic: rfl
state_before: R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
x : ↥U
⊢ toOpen R ⊤ ≫ germ (structureSheaf R).val ((fun x => ⟨↑x, ⋯⟩) x) = toStalk R ↑x
state_after: no goals
Theorem: beattySeq'_symmDiff_beattySeq_pos
File: Mathlib/NumberTheory/Rayleigh.lean

tactic: rw [symmDiff_comm, beattySeq_symmDiff_beattySeq'_pos hrs.symm]
state_before: r s : ℝ
hrs : r.IsConjExponent s
⊢ {x | ∃ k > 0, beattySeq' r k = x} ∆ {x | ∃ k > 0, beattySeq s k = x} = {n | 0 < n}
state_after: no goals
Theorem: CategoryTheory.ShiftedHom.comp_add
File: Mathlib/CategoryTheory/Shift/ShiftedHom.lean

tactic: rw [comp, comp, comp, Functor.map_add, Preadditive.add_comp, Preadditive.comp_add]
state_before: C : Type u_1
inst✝⁴ : Category.{u_3, u_1} C
M : Type u_2
inst✝³ : AddMonoid M
inst✝² : HasShift C M
X Y Z T : C
inst✝¹ : Preadditive C
inst✝ : ∀ (a : M), (shiftFunctor C a).Additive
a b c : M
α : ShiftedHom X Y a
β₁ β₂ : ShiftedHom Y Z b
h : b + a = c
⊢ α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h
state_after: no goals
Theorem: FreeCommRing.induction_on
File: Mathlib/RingTheory/FreeCommRing.lean

tactic: convert hm (of a) _ (hb a) ih
state_before: α : Type u
C : FreeCommRing α → Prop
z : FreeCommRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeCommRing α), C x → C (-x)
h1 : C 1
m✝ : Multiplicative (Multiset α)
a : α
m : Multiset α
ih : C (FreeAbelianGroup.of m)
⊢ C (FreeAbelianGroup.of (a ::ₘ m))
state_after: case h.e'_1
α : Type u
C : FreeCommRing α → Prop
z : FreeCommRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeCommRing α), C x → C (-x)
h1 : C 1
m✝ : Multiplicative (Multiset α)
a : α
m : Multiset α
ih : C (FreeAbelianGroup.of m)
⊢ FreeAbelianGroup.of (a ::ₘ m) = of a * FreeAbelianGroup.of m

tactic: apply of_cons
state_before: case h.e'_1
α : Type u
C : FreeCommRing α → Prop
z : FreeCommRing α
hn1 : C (-1)
hb : ∀ (b : α), C (of b)
ha : ∀ (x y : FreeCommRing α), C x → C y → C (x + y)
hm : ∀ (x y : FreeCommRing α), C x → C y → C (x * y)
hn : ∀ (x : FreeCommRing α), C x → C (-x)
h1 : C 1
m✝ : Multiplicative (Multiset α)
a : α
m : Multiset α
ih : C (FreeAbelianGroup.of m)
⊢ FreeAbelianGroup.of (a ::ₘ m) = of a * FreeAbelianGroup.of m
state_after: no goals
Theorem: Finset.prod_finset_product
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: refine Eq.trans ?_ (prod_sigma s t fun p => f (p.1, p.2))
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
r : Finset (γ × α)
s : Finset γ
t : γ → Finset α
h : ∀ (p : γ × α), p ∈ r ↔ p.1 ∈ s ∧ p.2 ∈ t p.1
f : γ × α → β
⊢ ∏ p ∈ r, f p = ∏ c ∈ s, ∏ a ∈ t c, f (c, a)
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
r : Finset (γ × α)
s : Finset γ
t : γ → Finset α
h : ∀ (p : γ × α), p ∈ r ↔ p.1 ∈ s ∧ p.2 ∈ t p.1
f : γ × α → β
⊢ ∏ p ∈ r, f p = ∏ x ∈ s.sigma t, f (x.fst, x.snd)

tactic: apply prod_equiv (Equiv.sigmaEquivProd _ _).symm <;> simp [h]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
r : Finset (γ × α)
s : Finset γ
t : γ → Finset α
h : ∀ (p : γ × α), p ∈ r ↔ p.1 ∈ s ∧ p.2 ∈ t p.1
f : γ × α → β
⊢ ∏ p ∈ r, f p = ∏ x ∈ s.sigma t, f (x.fst, x.snd)
state_after: no goals
Theorem: Ordnode.foldr_cons_eq_toList
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [foldr, foldr_cons_eq_toList l, foldr_cons_eq_toList r, ← List.cons_append,
    ← List.append_assoc, ← foldr_cons_eq_toList l]
state_before: α : Type u_1
size✝ : ℕ
l : Ordnode α
x : α
r : Ordnode α
r' : List α
⊢ foldr List.cons (node size✝ l x r) r' = (node size✝ l x r).toList ++ r'
state_after: α : Type u_1
size✝ : ℕ
l : Ordnode α
x : α
r : Ordnode α
r' : List α
⊢ foldr List.cons l (x :: r.toList) ++ r' = (node size✝ l x r).toList ++ r'

tactic: rfl
state_before: α : Type u_1
size✝ : ℕ
l : Ordnode α
x : α
r : Ordnode α
r' : List α
⊢ foldr List.cons l (x :: r.toList) ++ r' = (node size✝ l x r).toList ++ r'
state_after: no goals
Theorem: elementalStarAlgebra.closedEmbedding_coe
File: Mathlib/Topology/Algebra/StarSubalgebra.lean

tactic: convert isClosed R x
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : StarRing A
inst✝⁷ : TopologicalSemiring A
inst✝⁶ : ContinuousStar A
inst✝⁵ : Algebra R A
inst✝⁴ : StarModule R A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : StarRing B
inst✝ : Algebra R B
x : A
⊢ IsClosed (range Subtype.val)
state_after: case h.e'_3
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : StarRing A
inst✝⁷ : TopologicalSemiring A
inst✝⁶ : ContinuousStar A
inst✝⁵ : Algebra R A
inst✝⁴ : StarModule R A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : StarRing B
inst✝ : Algebra R B
x : A
⊢ range Subtype.val = ↑(elementalStarAlgebra R x)

tactic: exact
  Set.ext fun y =>
    ⟨by
      rintro ⟨y, rfl⟩
      exact y.prop, fun hy => ⟨⟨y, hy⟩, rfl⟩⟩
state_before: case h.e'_3
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : StarRing A
inst✝⁷ : TopologicalSemiring A
inst✝⁶ : ContinuousStar A
inst✝⁵ : Algebra R A
inst✝⁴ : StarModule R A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : StarRing B
inst✝ : Algebra R B
x : A
⊢ range Subtype.val = ↑(elementalStarAlgebra R x)
state_after: no goals

tactic: rintro ⟨y, rfl⟩
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : StarRing A
inst✝⁷ : TopologicalSemiring A
inst✝⁶ : ContinuousStar A
inst✝⁵ : Algebra R A
inst✝⁴ : StarModule R A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : StarRing B
inst✝ : Algebra R B
x y : A
⊢ y ∈ range Subtype.val → y ∈ ↑(elementalStarAlgebra R x)
state_after: case intro
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : StarRing A
inst✝⁷ : TopologicalSemiring A
inst✝⁶ : ContinuousStar A
inst✝⁵ : Algebra R A
inst✝⁴ : StarModule R A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : StarRing B
inst✝ : Algebra R B
x : A
y : { x_1 // x_1 ∈ ↑(elementalStarAlgebra R x) }
⊢ ↑y ∈ ↑(elementalStarAlgebra R x)

tactic: exact y.prop
state_before: case intro
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : StarRing A
inst✝⁷ : TopologicalSemiring A
inst✝⁶ : ContinuousStar A
inst✝⁵ : Algebra R A
inst✝⁴ : StarModule R A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : StarRing B
inst✝ : Algebra R B
x : A
y : { x_1 // x_1 ∈ ↑(elementalStarAlgebra R x) }
⊢ ↑y ∈ ↑(elementalStarAlgebra R x)
state_after: no goals
Theorem: Matroid.comapOn_base_iff_of_bijOn
File: Mathlib/Data/Matroid/Map.lean

tactic: rw [← and_iff_left_of_imp (Base.subset_ground (M := N.comapOn E f) (B := B)),
  comapOn_ground_eq, and_congr_left_iff]
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M : Matroid α
N : Matroid β
E B I : Set α
h : BijOn f E N.E
⊢ (N.comapOn E f).Base B ↔ N.Base (f '' B) ∧ B ⊆ E
state_after: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M : Matroid α
N : Matroid β
E B I : Set α
h : BijOn f E N.E
⊢ B ⊆ E → ((N.comapOn E f).Base B ↔ N.Base (f '' B))

tactic: suffices h' : B ⊆ E → InjOn f B from fun hB ↦
  by simp [hB, comapOn_base_iff_of_surjOn h.surjOn, h']
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M : Matroid α
N : Matroid β
E B I : Set α
h : BijOn f E N.E
⊢ B ⊆ E → ((N.comapOn E f).Base B ↔ N.Base (f '' B))
state_after: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M : Matroid α
N : Matroid β
E B I : Set α
h : BijOn f E N.E
⊢ B ⊆ E → InjOn f B

tactic: exact fun hBE ↦ h.injOn.mono hBE
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M : Matroid α
N : Matroid β
E B I : Set α
h : BijOn f E N.E
⊢ B ⊆ E → InjOn f B
state_after: no goals

tactic: simp [hB, comapOn_base_iff_of_surjOn h.surjOn, h']
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M : Matroid α
N : Matroid β
E B I : Set α
h : BijOn f E N.E
h' : B ⊆ E → InjOn f B
hB : B ⊆ E
⊢ (N.comapOn E f).Base B ↔ N.Base (f '' B)
state_after: no goals