1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MetricSpace.replaceBornology_eq
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: ext
state_before: α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α✝
γ : Type w
inst✝ : MetricSpace γ
α : Type u_3
m : MetricSpace α
B : Bornology α
H : ∀ (s : Set α), IsBounded s ↔ IsBounded s
⊢ m.replaceBornology H = m
state_after: case h.dist.h.h
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α✝
γ : Type w
inst✝ : MetricSpace γ
α : Type u_3
m : MetricSpace α
B : Bornology α
H : ∀ (s : Set α), IsBounded s ↔ IsBounded s
x✝¹ x✝ : α
⊢ dist x✝¹ x✝ = dist x✝¹ x✝

tactic: rfl
state_before: case h.dist.h.h
α✝ : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝¹ : PseudoMetricSpace α✝
γ : Type w
inst✝ : MetricSpace γ
α : Type u_3
m : MetricSpace α
B : Bornology α
H : ∀ (s : Set α), IsBounded s ↔ IsBounded s
x✝¹ x✝ : α
⊢ dist x✝¹ x✝ = dist x✝¹ x✝
state_after: no goals
Theorem: Set.surjOn_iInter
File: Mathlib/Data/Set/Lattice.lean

tactic: intro y hy
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
inst✝ : Nonempty ι
s : ι → Set α
t : Set β
f : α → β
H : ∀ (i : ι), SurjOn f (s i) t
Hinj : InjOn f (⋃ i, s i)
⊢ SurjOn f (⋂ i, s i) t
state_after: α : 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
inst✝ : Nonempty ι
s : ι → Set α
t : Set β
f : α → β
H : ∀ (i : ι), SurjOn f (s i) t
Hinj : InjOn f (⋃ i, s i)
y : β
hy : y ∈ t
⊢ y ∈ f '' ⋂ i, s i

tactic: rw [Hinj.image_iInter_eq, mem_iInter]
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
inst✝ : Nonempty ι
s : ι → Set α
t : Set β
f : α → β
H : ∀ (i : ι), SurjOn f (s i) t
Hinj : InjOn f (⋃ i, s i)
y : β
hy : y ∈ t
⊢ y ∈ f '' ⋂ i, s i
state_after: α : 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
inst✝ : Nonempty ι
s : ι → Set α
t : Set β
f : α → β
H : ∀ (i : ι), SurjOn f (s i) t
Hinj : InjOn f (⋃ i, s i)
y : β
hy : y ∈ t
⊢ ∀ (i : ι), y ∈ f '' s i

tactic: exact fun i => H i hy
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
inst✝ : Nonempty ι
s : ι → Set α
t : Set β
f : α → β
H : ∀ (i : ι), SurjOn f (s i) t
Hinj : InjOn f (⋃ i, s i)
y : β
hy : y ∈ t
⊢ ∀ (i : ι), y ∈ f '' s i
state_after: no goals
Theorem: Finset.filter_ne'
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [@ne_comm _ b]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝³ : DecidablePred p
inst✝² : DecidablePred q
s✝ : Finset α
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
s : Finset β
b x✝¹ : β
x✝ : x✝¹ ∈ s
⊢ x✝¹ ≠ b ↔ b ≠ x✝¹
state_after: no goals
Theorem: PiLp.edist_self
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: rcases p.trichotomy with (rfl | rfl | h)
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp p β
⊢ edist f f = 0
state_after: case inl
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp 0 β
⊢ edist f f = 0

case inr.inl
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp ⊤ β
⊢ edist f f = 0

case inr.inr
p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp p β
h : 0 < p.toReal
⊢ edist f f = 0

tactic: simp [edist_eq_card]
state_before: case inl
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp 0 β
⊢ edist f f = 0
state_after: no goals

tactic: simp [edist_eq_iSup]
state_before: case inr.inl
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp ⊤ β
⊢ edist f f = 0
state_after: no goals

tactic: simp [edist_eq_sum h, ENNReal.zero_rpow_of_pos h, ENNReal.zero_rpow_of_pos (inv_pos.2 <| h)]
state_before: case inr.inr
p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β : ι → Type u_4
inst✝¹ : Fintype ι
inst✝ : (i : ι) → PseudoEMetricSpace (β i)
f : PiLp p β
h : 0 < p.toReal
⊢ edist f f = 0
state_after: no goals
Theorem: Continuous.isProperMap
File: Mathlib/Topology/ProperMap.lean

tactic: simp
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
inst✝¹ : CompactSpace X
inst✝ : T2Space Y
hf : Continuous f
⊢ Tendsto f (cocompact X) cofinite
state_after: no goals
Theorem: TrivSqZeroExt.snd_map
File: Mathlib/Algebra/TrivSqZeroExt.lean

tactic: simp [map, lift_def, Algebra.ofId_apply, algebraMap_eq_inl]
state_before: S : Type u_1
R R' : Type u
M : Type v
inst✝²⁶ : CommSemiring S
inst✝²⁵ : Semiring R
inst✝²⁴ : CommSemiring R'
inst✝²³ : AddCommMonoid M
inst✝²² : Algebra S R
inst✝²¹ : Algebra S R'
inst✝²⁰ : Module S M
inst✝¹⁹ : Module R M
inst✝¹⁸ : Module Rᵐᵒᵖ M
inst✝¹⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝¹⁶ : IsScalarTower S R M
inst✝¹⁵ : IsScalarTower S Rᵐᵒᵖ M
inst✝¹⁴ : Module R' M
inst✝¹³ : Module R'ᵐᵒᵖ M
inst✝¹² : IsCentralScalar R' M
inst✝¹¹ : IsScalarTower S R' M
A : Type u_2
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra S A
inst✝⁸ : Algebra R' A
N : Type u_3
P : Type u_4
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R' N
inst✝⁵ : Module R'ᵐᵒᵖ N
inst✝⁴ : IsCentralScalar R' N
inst✝³ : AddCommMonoid P
inst✝² : Module R' P
inst✝¹ : Module R'ᵐᵒᵖ P
inst✝ : IsCentralScalar R' P
f : M →ₗ[R'] N
x : tsze R' M
⊢ ((map f) x).snd = f x.snd
state_after: no goals
Theorem: Subgroup.singleton_mul_subgroup
File: Mathlib/Algebra/Group/Subgroup/Pointwise.lean

tactic: simpa [preimage, mul_mem_cancel_left (inv_mem hh)]
state_before: α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝³ : Group G
inst✝² : AddGroup A
s : Set G
inst✝¹ : Group α
inst✝ : MulDistribMulAction α G
H : Subgroup G
h : G
hh : h ∈ H
this : {x | x ∈ H} = ↑H
⊢ {h} * ↑H = ↑H
state_after: no goals
Theorem: padicNormE.norm_int_le_pow_iff_dvd
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: have : (p : ℝ) ^ (-n : ℤ) = (p : ℚ) ^ (-n : ℤ) := by simp
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
⊢ ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑p ^ n ∣ k
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑p ^ n ∣ k

tactic: rw [show (k : ℚ_[p]) = ((k : ℚ) : ℚ_[p]) by norm_cast, eq_padicNorm, this]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑p ^ n ∣ k
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ ↑(padicNorm p ↑k) ≤ ↑↑p ^ (-↑n) ↔ ↑p ^ n ∣ k

tactic: norm_cast
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ ↑(padicNorm p ↑k) ≤ ↑↑p ^ (-↑n) ↔ ↑p ^ n ∣ k
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ padicNorm p ↑k ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k

tactic: rw [← padicNorm.dvd_iff_norm_le]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ padicNorm p ↑k ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k
state_after: no goals

tactic: simp
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
⊢ ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
state_after: no goals

tactic: norm_cast
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
n : ℕ
this : ↑p ^ (-↑n) = ↑↑p ^ (-↑n)
⊢ ↑k = ↑↑k
state_after: no goals
Theorem: List.length_sublists'
File: Mathlib/Data/List/Sublists.lean

tactic: simp_arith only [sublists'_cons, length_append, length_sublists' l,
  length_map, length, Nat.pow_succ']
state_before: α : Type u
β : Type v
γ : Type w
a : α
l : List α
⊢ (a :: l).sublists'.length = 2 ^ (a :: l).length
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.ofFunction_le
File: Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean

tactic: rintro (_ | i)
state_before: α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
f : ℕ → Set α := fun i => Nat.casesOn i s fun x => ∅
⊢ ∀ (b' : ℕ), b' ≠ 0 → m (f b') = 0
state_after: case zero
α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
f : ℕ → Set α := fun i => Nat.casesOn i s fun x => ∅
⊢ 0 ≠ 0 → m (f 0) = 0

case succ
α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
f : ℕ → Set α := fun i => Nat.casesOn i s fun x => ∅
i : ℕ
⊢ i + 1 ≠ 0 → m (f (i + 1)) = 0

tactic: simp
state_before: case zero
α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
f : ℕ → Set α := fun i => Nat.casesOn i s fun x => ∅
⊢ 0 ≠ 0 → m (f 0) = 0
state_after: no goals

tactic: simp [m_empty]
state_before: case succ
α : Type u_1
m : Set α → ℝ≥0∞
m_empty : m ∅ = 0
s : Set α
f : ℕ → Set α := fun i => Nat.casesOn i s fun x => ∅
i : ℕ
⊢ i + 1 ≠ 0 → m (f (i + 1)) = 0
state_after: no goals
Theorem: EReal.exists_rat_btwn_of_lt
File: Mathlib/Data/Real/EReal.lean

tactic: simp [exists_rat_btwn (EReal.coe_lt_coe_iff.1 h)]
state_before: a b : ℝ
h : ↑a < ↑b
⊢ ∃ x, ↑a < ↑↑x ∧ ↑↑x < ↑b
state_after: no goals

tactic: simpa using hab
state_before: a : ℝ
x✝ : ↑a < ⊤
b : ℚ
hab : a < ↑b
⊢ ↑a < ↑↑b
state_after: no goals

tactic: simpa using hab
state_before: a : ℝ
x✝ : ⊥ < ↑a
b : ℚ
hab : ↑b < a
⊢ ↑↑b < ↑a
state_after: no goals
Theorem: jacobiSym.legendreSym.to_jacobiSym
File: Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean

tactic: simp only [jacobiSym, factors_prime fp.1, List.prod_cons, List.prod_nil, mul_one, List.pmap]
state_before: p : ℕ
fp : Fact (Nat.Prime p)
a : ℤ
⊢ legendreSym p a = J(a | p)
state_after: no goals
Theorem: exists_lt_of_lt_csSup'
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: contrapose! h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLinearOrderBot α
s✝ : Set α
f : ι → α
a✝ : α
s : Set α
a : α
h : a < sSup s
⊢ ∃ b ∈ s, a < b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLinearOrderBot α
s✝ : Set α
f : ι → α
a✝ : α
s : Set α
a : α
h : ∀ b ∈ s, b ≤ a
⊢ sSup s ≤ a

tactic: exact csSup_le' h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLinearOrderBot α
s✝ : Set α
f : ι → α
a✝ : α
s : Set α
a : α
h : ∀ b ∈ s, b ≤ a
⊢ sSup s ≤ a
state_after: no goals
Theorem: SimpleGraph.Coloring.odd_length_iff_not_congr
File: Mathlib/Combinatorics/SimpleGraph/ConcreteColorings.lean

tactic: rw [Nat.odd_iff_not_even, c.even_length_iff_congr p]
state_before: α : Type u_1
G : SimpleGraph α
c : G.Coloring Bool
u v : α
p : G.Walk u v
⊢ Odd p.length ↔ (¬c u = true ↔ c v = true)
state_after: α : Type u_1
G : SimpleGraph α
c : G.Coloring Bool
u v : α
p : G.Walk u v
⊢ ¬(c u = true ↔ c v = true) ↔ (¬c u = true ↔ c v = true)

tactic: tauto
state_before: α : Type u_1
G : SimpleGraph α
c : G.Coloring Bool
u v : α
p : G.Walk u v
⊢ ¬(c u = true ↔ c v = true) ↔ (¬c u = true ↔ c v = true)
state_after: no goals
Theorem: Basis.reindexFinsetRange_apply
File: Mathlib/LinearAlgebra/Basis.lean

tactic: rcases x with ⟨bi, hbi⟩
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x✝ : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
x : { x // x ∈ Finset.image (⇑b) Finset.univ }
⊢ b.reindexFinsetRange x = ↑x
state_after: case mk
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
bi : M
hbi : bi ∈ Finset.image (⇑b) Finset.univ
⊢ b.reindexFinsetRange ⟨bi, hbi⟩ = ↑⟨bi, hbi⟩

tactic: rcases Finset.mem_image.mp hbi with ⟨i, -, rfl⟩
state_before: case mk
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
bi : M
hbi : bi ∈ Finset.image (⇑b) Finset.univ
⊢ b.reindexFinsetRange ⟨bi, hbi⟩ = ↑⟨bi, hbi⟩
state_after: case mk.intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
i : ι
hbi : b i ∈ Finset.image (⇑b) Finset.univ
⊢ b.reindexFinsetRange ⟨b i, hbi⟩ = ↑⟨b i, hbi⟩

tactic: exact b.reindexFinsetRange_self i
state_before: case mk.intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
i : ι
hbi : b i ∈ Finset.image (⇑b) Finset.univ
⊢ b.reindexFinsetRange ⟨b i, hbi⟩ = ↑⟨b i, hbi⟩
state_after: no goals
Theorem: Finset.sum_smul_vsub_const_eq_weightedVSub
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [sum_smul_vsub_eq_weightedVSub_sub, s.weightedVSub_apply_const _ _ h, sub_zero]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w : ι → k
p₁ : ι → P
p₂ : P
h : ∑ i ∈ s, w i = 0
⊢ ∑ i ∈ s, w i • (p₁ i -ᵥ p₂) = (s.weightedVSub p₁) w
state_after: no goals
Theorem: Prop.exists
File: Mathlib/Logic/Lemmas.lean

tactic: refine (em p).imp ?_ ?_ <;> intro H <;> convert h <;> simp [H]
state_before: α : Sort u_1
p✝ q r : Prop
inst✝¹ : Decidable p✝
inst✝ : Decidable q
a b c : α
f : Prop → Prop
x✝ : ∃ p, f p
p : Prop
h : f p
⊢ f True ∨ f False
state_after: no goals

tactic: rintro (h | h) <;> exact ⟨_, h⟩
state_before: α : Sort u_1
p q r : Prop
inst✝¹ : Decidable p
inst✝ : Decidable q
a b c : α
f : Prop → Prop
⊢ f True ∨ f False → ∃ p, f p
state_after: no goals
Theorem: AlgebraicGeometry.LocallyRingedSpace.Γ_Spec_left_triangle
File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

tactic: unfold toSpecΓ
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ toSpecΓ (Γ.obj { unop := X }) ≫ X.toΓSpec.val.c.app { unop := ⊤ } = 𝟙 (Γ.obj { unop := X })
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ toOpen ↑(Γ.obj { unop := X }) ⊤ ≫ X.toΓSpec.val.c.app { unop := ⊤ } = 𝟙 (Γ.obj { unop := X })

tactic: rw [← toOpen_res _ (basicOpen (1 : Γ.obj (op X))) ⊤ (eqToHom basicOpen_one.symm)]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ toOpen ↑(Γ.obj { unop := X }) ⊤ ≫ X.toΓSpec.val.c.app { unop := ⊤ } = 𝟙 (Γ.obj { unop := X })
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (toOpen (↑(Γ.obj { unop := X })) (basicOpen 1) ≫ (structureSheaf ↑(Γ.obj { unop := X })).val.map (eqToHom ⋯).op) ≫
      X.toΓSpec.val.c.app { unop := ⊤ } =
    𝟙 (Γ.obj { unop := X })

tactic: erw [Category.assoc]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (toOpen (↑(Γ.obj { unop := X })) (basicOpen 1) ≫ (structureSheaf ↑(Γ.obj { unop := X })).val.map (eqToHom ⋯).op) ≫
      X.toΓSpec.val.c.app { unop := ⊤ } =
    𝟙 (Γ.obj { unop := X })
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen 1) ≫
      (structureSheaf ↑(Γ.obj { unop := X })).val.map (eqToHom ⋯).op ≫ X.toΓSpec.val.c.app { unop := ⊤ } =
    𝟙 (Γ.obj { unop := X })

tactic: rw [NatTrans.naturality, ← Category.assoc]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ toOpen (↑(Γ.obj { unop := X })) (basicOpen 1) ≫
      (structureSheaf ↑(Γ.obj { unop := X })).val.map (eqToHom ⋯).op ≫ X.toΓSpec.val.c.app { unop := ⊤ } =
    𝟙 (Γ.obj { unop := X })
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (toOpen (↑(Γ.obj { unop := X })) (basicOpen 1) ≫ X.toΓSpec.val.c.app { unop := basicOpen 1 }) ≫
      (X.toΓSpec.val.base _* X.presheaf).map (eqToHom ⋯).op =
    𝟙 (Γ.obj { unop := X })

tactic: erw [X.toΓSpecSheafedSpace_app_spec 1, ← Functor.map_comp]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ (toOpen (↑(Γ.obj { unop := X })) (basicOpen 1) ≫ X.toΓSpec.val.c.app { unop := basicOpen 1 }) ≫
      (X.toΓSpec.val.base _* X.presheaf).map (eqToHom ⋯).op =
    𝟙 (Γ.obj { unop := X })
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ X.presheaf.map ((X.toΓSpecMapBasicOpen 1).leTop.op ≫ (Opens.map X.toΓSpec.val.base).op.map (eqToHom ⋯).op) =
    𝟙 (Γ.obj { unop := X })

tactic: convert eqToHom_map X.presheaf _
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ X.presheaf.map ((X.toΓSpecMapBasicOpen 1).leTop.op ≫ (Opens.map X.toΓSpec.val.base).op.map (eqToHom ⋯).op) =
    𝟙 (Γ.obj { unop := X })
state_after: case convert_3
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ { unop := ⊤ } = (Opens.map X.toΓSpec.val.base).op.obj { unop := ⊤ }

tactic: rfl
state_before: case convert_3
X : LocallyRingedSpace
r : ↑(Γ.obj { unop := X })
⊢ { unop := ⊤ } = (Opens.map X.toΓSpec.val.base).op.obj { unop := ⊤ }
state_after: no goals
Theorem: RingHom.ext_zmod
File: Mathlib/Data/ZMod/Basic.lean

tactic: ext a
state_before: n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
⊢ f = g
state_after: case a
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
a : ZMod n
⊢ f a = g a

tactic: obtain ⟨k, rfl⟩ := ZMod.intCast_surjective a
state_before: case a
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
a : ZMod n
⊢ f a = g a
state_after: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
⊢ f ↑k = g ↑k

tactic: let φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
state_before: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
⊢ f ↑k = g ↑k
state_after: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
⊢ f ↑k = g ↑k

tactic: let ψ : ℤ →+* R := g.comp (Int.castRingHom (ZMod n))
state_before: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
⊢ f ↑k = g ↑k
state_after: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
ψ : ℤ →+* R := g.comp (Int.castRingHom (ZMod n))
⊢ f ↑k = g ↑k

tactic: show φ k = ψ k
state_before: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
ψ : ℤ →+* R := g.comp (Int.castRingHom (ZMod n))
⊢ f ↑k = g ↑k
state_after: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
ψ : ℤ →+* R := g.comp (Int.castRingHom (ZMod n))
⊢ φ k = ψ k

tactic: rw [φ.ext_int ψ]
state_before: case a.intro
n : ℕ
R : Type u_1
inst✝ : Semiring R
f g : ZMod n →+* R
k : ℤ
φ : ℤ →+* R := f.comp (Int.castRingHom (ZMod n))
ψ : ℤ →+* R := g.comp (Int.castRingHom (ZMod n))
⊢ φ k = ψ k
state_after: no goals
Theorem: Ordinal.CNF_foldr
File: Mathlib/SetTheory/Ordinal/CantorNormalForm.lean

tactic: rw [CNF_zero]
state_before: b o : Ordinal.{u_1}
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 (CNF b 0) = 0
state_after: b o : Ordinal.{u_1}
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 [] = 0

tactic: rfl
state_before: b o : Ordinal.{u_1}
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 [] = 0
state_after: no goals

tactic: rw [CNF_ne_zero ho, foldr_cons, IH, div_add_mod]
state_before: b o✝ o : Ordinal.{u_1}
ho : o ≠ 0
IH : foldr (fun p r => b ^ p.1 * p.2 + r) 0 (CNF b (o % b ^ log b o)) = o % b ^ log b o
⊢ foldr (fun p r => b ^ p.1 * p.2 + r) 0 (CNF b o) = o
state_after: no goals
Theorem: AhlswedeZhang.IsAntichain.le_infSum
File: Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean

tactic: calc
  _ = ∑ s ∈ 𝒜, (truncatedInf 𝒜 s).card / (s.card * (card α).choose s.card : ℚ) := ?_
  _ ≤ _ := sum_le_univ_sum_of_nonneg fun s ↦ by positivity
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
⊢ ∑ s ∈ 𝒜, (↑((card α).choose s.card))⁻¹ ≤ infSum 𝒜
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
⊢ ∑ s ∈ 𝒜, (↑((card α).choose s.card))⁻¹ = ∑ s ∈ 𝒜, ↑(𝒜.truncatedInf s).card / (↑s.card * ↑((card α).choose s.card))

tactic: refine sum_congr rfl fun s hs ↦ ?_
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
⊢ ∑ s ∈ 𝒜, (↑((card α).choose s.card))⁻¹ = ∑ s ∈ 𝒜, ↑(𝒜.truncatedInf s).card / (↑s.card * ↑((card α).choose s.card))
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
hs : s ∈ 𝒜
⊢ (↑((card α).choose s.card))⁻¹ = ↑(𝒜.truncatedInf s).card / (↑s.card * ↑((card α).choose s.card))

tactic: rw [truncatedInf_of_isAntichain h𝒜 hs, div_mul_cancel_left₀]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
hs : s ∈ 𝒜
⊢ (↑((card α).choose s.card))⁻¹ = ↑(𝒜.truncatedInf s).card / (↑s.card * ↑((card α).choose s.card))
state_after: case ha
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
hs : s ∈ 𝒜
⊢ ↑s.card ≠ 0

tactic: have := (nonempty_iff_ne_empty.2 $ ne_of_mem_of_not_mem hs h𝒜₀).card_pos
state_before: case ha
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
hs : s ∈ 𝒜
⊢ ↑s.card ≠ 0
state_after: case ha
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
hs : s ∈ 𝒜
this : 0 < s.card
⊢ ↑s.card ≠ 0

tactic: positivity
state_before: case ha
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
hs : s ∈ 𝒜
this : 0 < s.card
⊢ ↑s.card ≠ 0
state_after: no goals

tactic: positivity
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
h𝒜₀ : ∅ ∉ 𝒜
s : Finset α
⊢ 0 ≤ ↑(𝒜.truncatedInf s).card / (↑s.card * ↑((card α).choose s.card))
state_after: no goals
Theorem: nhdsWithin_Iio_neBot'
File: Mathlib/Topology/Order/DenselyOrdered.lean

tactic: rwa [closure_Iio' H₁]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b✝ : α
s : Set α
b c : α
H₁ : (Iio c).Nonempty
H₂ : b ≤ c
⊢ b ∈ closure (Iio c)
state_after: no goals