ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Filter.map₂_right
File: Mathlib/Order/Filter/NAry.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
m : α → β → γ
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
h h₁ h₂ : Filter γ
s s₁ s₂ : Set α
t t₁ t₂ : Set β
u : Set γ
v : Set δ
a : α
b : β
c : γ
inst✝ : f.NeBot
⊢ map₂ (fun x y => y) f g = g
state_after: no goals
tactic: rw [map₂_swap, map₂_left]
Theorem: MeasureTheory.measure_eq_extend
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
hs : MeasurableSet s
⊢ μ s = extend (fun t _ht => μ t) s
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
hs : MeasurableSet s
⊢ MeasurableSet s
tactic: rw [extend_eq]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
hs : MeasurableSet s
⊢ MeasurableSet s
state_after: no goals
tactic: exact hs
Theorem: Set.diff_singleton_eq_self
File: Mathlib/Data/Set/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a✝ b : α
s✝ s₁ s₂ t t₁ t₂ u : Set α
a : α
s : Set α
h : a ∉ s
⊢ Disjoint {a} s
state_after: no goals
tactic: simp [h]
Theorem: LinearEquiv.lTensor_pow
File: Mathlib/LinearAlgebra/TensorProduct/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P ≃ₗ[R] Q
f✝ : N ≃ₗ[R] P
m : M
n✝ : N
p : P
x : M ⊗[R] N
y : N ⊗[R] M
f : N ≃ₗ[R] N
n : ℕ
⊢ lTensor M f ^ n = lTensor M (f ^ n)
state_after: no goals
tactic: simpa only [one_pow] using TensorProduct.congr_pow (1 : M ≃ₗ[R] M) f n
Theorem: Fin.snoc_eq_cons_rotate
File: Mathlib/Logic/Equiv/Fin.lean

Proof steps:
state_before: m n : ℕ
α : Type u_1
v : Fin n → α
a : α
⊢ snoc v a = fun i => cons a v ((finRotate (n + 1)) i)
state_after: case h.mk
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
⊢ snoc v a ⟨i, h⟩ = cons a v ((finRotate (n + 1)) ⟨i, h⟩)
tactic: ext ⟨i, h⟩
state_before: case h.mk
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
⊢ snoc v a ⟨i, h⟩ = cons a v ((finRotate (n + 1)) ⟨i, h⟩)
state_after: case pos
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : i < n
⊢ snoc v a ⟨i, h⟩ = cons a v ((finRotate (n + 1)) ⟨i, h⟩)

case neg
m n : ℕ
α : Type u_1
v : Fin n → α
a : α
i : ℕ
h : i < n + 1
h' : ¬i < n
⊢ snoc v a ⟨i, h⟩ = cons a v ((finRotate (n + 1)) ⟨i, h⟩)
tactic: by_cases h' : i < n
Theorem: CategoryTheory.Endofunctor.Algebra.iso_of_iso
File: Mathlib/CategoryTheory/Endofunctor/Algebra.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ F.map (inv f.f) ≫ A₀.str = A₁.str ≫ inv f.f
state_after: C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ F.map (inv f.f) ≫ F.map f.f ≫ A₁.str = A₁.str
tactic: rw [IsIso.eq_comp_inv f.1, Category.assoc, ← f.h]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ F.map (inv f.f) ≫ F.map f.f ≫ A₁.str = A₁.str
state_after: no goals
tactic: simp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ f ≫ { f := inv f.f, h := ⋯ } = 𝟙 A₀
state_after: no goals
tactic: aesop_cat
state_before: C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ { f := inv f.f, h := ⋯ } ≫ f = 𝟙 A₁
state_after: no goals
tactic: aesop_cat
Theorem: RingHom.surjectiveOnStalks_of_isLocalization
File: Mathlib/RingTheory/SurjectiveOnStalks.lean

Proof steps:
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
T : Type u_3
inst✝⁴ : CommRing T
inst✝³ : Algebra R T
inst✝² : Algebra S T
inst✝¹ : IsScalarTower R S T
g : S →+* T
f : R →+* S
inst✝ : IsLocalization M S
⊢ (algebraMap R S).SurjectiveOnStalks
state_after: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
T : Type u_3
inst✝⁴ : CommRing T
inst✝³ : Algebra R T
inst✝² : Algebra S T
inst✝¹ : IsScalarTower R S T
g : S →+* T
f : R →+* S
inst✝ : IsLocalization M S
s : S
⊢ ∃ r s_1, IsUnit ((algebraMap R S) s_1) ∧ (algebraMap R S) s_1 * s = (algebraMap R S) r
tactic: refine surjectiveOnStalks_of_exists_div fun s ↦ ?_
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
T : Type u_3
inst✝⁴ : CommRing T
inst✝³ : Algebra R T
inst✝² : Algebra S T
inst✝¹ : IsScalarTower R S T
g : S →+* T
f : R →+* S
inst✝ : IsLocalization M S
s : S
⊢ ∃ r s_1, IsUnit ((algebraMap R S) s_1) ∧ (algebraMap R S) s_1 * s = (algebraMap R S) r
state_after: case intro.intro
R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
T : Type u_3
inst✝⁴ : CommRing T
inst✝³ : Algebra R T
inst✝² : Algebra S T
inst✝¹ : IsScalarTower R S T
g : S →+* T
f : R →+* S
inst✝ : IsLocalization M S
x : R
s : ↥M
⊢ ∃ r s_1, IsUnit ((algebraMap R S) s_1) ∧ (algebraMap R S) s_1 * IsLocalization.mk' S x s = (algebraMap R S) r
tactic: obtain ⟨x, s, rfl⟩ := IsLocalization.mk'_surjective M s
state_before: case intro.intro
R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
T : Type u_3
inst✝⁴ : CommRing T
inst✝³ : Algebra R T
inst✝² : Algebra S T
inst✝¹ : IsScalarTower R S T
g : S →+* T
f : R →+* S
inst✝ : IsLocalization M S
x : R
s : ↥M
⊢ ∃ r s_1, IsUnit ((algebraMap R S) s_1) ∧ (algebraMap R S) s_1 * IsLocalization.mk' S x s = (algebraMap R S) r
state_after: no goals
tactic: exact ⟨x, s, IsLocalization.map_units S s, IsLocalization.mk'_spec' S x s⟩
Theorem: ContDiffAt.sum
File: Mathlib/Analysis/Calculus/ContDiff/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s✝ s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x✝ x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
ι : Type u_3
f : ι → E → F
s : Finset ι
x : E
h : ∀ i ∈ s, ContDiffAt 𝕜 n (fun x => f i x) x
⊢ ContDiffAt 𝕜 n (fun x => ∑ i ∈ s, f i x) x
state_after: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s✝ s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x✝ x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
ι : Type u_3
f : ι → E → F
s : Finset ι
x : E
h : ∀ i ∈ s, ContDiffAt 𝕜 n (fun x => f i x) x
⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i ∈ s, f i x) univ x
tactic: rw [← contDiffWithinAt_univ] at *
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s✝ s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x✝ x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
ι : Type u_3
f : ι → E → F
s : Finset ι
x : E
h : ∀ i ∈ s, ContDiffAt 𝕜 n (fun x => f i x) x
⊢ ContDiffWithinAt 𝕜 n (fun x => ∑ i ∈ s, f i x) univ x
state_after: no goals
tactic: exact ContDiffWithinAt.sum h
Theorem: NonUnitalSubring.coe_iInf
File: Mathlib/RingTheory/NonUnitalSubring/Basic.lean

Proof steps:
state_before: F : Type w
R : Type u
S✝ : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S✝
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S✝
inst✝ : NonUnitalRingHomClass F R S✝
g : S✝ →ₙ+* T
f : R →ₙ+* S✝
ι : Sort u_2
S : ι → NonUnitalSubring R
⊢ ↑(⨅ i, S i) = ⋂ i, ↑(S i)
state_after: no goals
tactic: simp only [iInf, coe_sInf, Set.biInter_range]
Theorem: add_le_add_add_tsub
File: Mathlib/Algebra/Order/Sub/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a + b ≤ a + c + (b - c)
state_after: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a + b ≤ a + (c + (b - c))
tactic: rw [add_assoc]
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a + b ≤ a + (c + (b - c))
state_after: no goals
tactic: exact add_le_add_left le_add_tsub a
Theorem: Int.testBit_bitwise
File: Mathlib/Data/Int/Bitwise.lean

Proof steps:
state_before: f : Bool → Bool → Bool
m n : ℤ
k : ℕ
⊢ (bitwise f m n).testBit k = f (m.testBit k) (n.testBit k)
state_after: case ofNat.ofNat
f : Bool → Bool → Bool
k a✝¹ a✝ : ℕ
⊢ (match bif f false false then -[Nat.bitwise (fun x y => !f x y) a✝¹ a✝+1] else ↑(Nat.bitwise f a✝¹ a✝), k with
    | ofNat m, n => m.testBit n
    | -[m+1], n => !m.testBit n) =
    f (a✝¹.testBit k) (a✝.testBit k)

case ofNat.negSucc
f : Bool → Bool → Bool
k a✝¹ a✝ : ℕ
⊢ (match
      bif f false !false then -[Nat.bitwise (fun x y => !f x !y) a✝¹ a✝+1]
      else ↑(Nat.bitwise (fun x y => f x !y) a✝¹ a✝),
      k with
    | ofNat m, n => m.testBit n
    | -[m+1], n => !m.testBit n) =
    f (a✝¹.testBit k) !a✝.testBit k

case negSucc.ofNat
f : Bool → Bool → Bool
k a✝¹ a✝ : ℕ
⊢ (match
      bif f (!false) false then -[Nat.bitwise (fun x y => !f (!x) y) a✝¹ a✝+1]
      else ↑(Nat.bitwise (fun x y => f (!x) y) a✝¹ a✝),
      k with
    | ofNat m, n => m.testBit n
    | -[m+1], n => !m.testBit n) =
    f (!a✝¹.testBit k) (a✝.testBit k)

case negSucc.negSucc
f : Bool → Bool → Bool
k a✝¹ a✝ : ℕ
⊢ (match
      bif f (!false) !false then -[Nat.bitwise (fun x y => !f (!x) !y) a✝¹ a✝+1]
      else ↑(Nat.bitwise (fun x y => f (!x) !y) a✝¹ a✝),
      k with
    | ofNat m, n => m.testBit n
    | -[m+1], n => !m.testBit n) =
    f (!a✝¹.testBit k) !a✝.testBit k
tactic: cases m <;> cases n <;> simp only [testBit, bitwise, natBitwise]
Theorem: Finset.one_lt_prod
File: Mathlib/Algebra/Order/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
G : Type u_6
k : Type u_7
R : Type u_8
inst✝ : OrderedCancelCommMonoid M
f g : ι → M
s t : Finset ι
h : ∀ i ∈ s, 1 < f i
hs : s.Nonempty
⊢ 1 ≤ ∏ i ∈ s, 1
state_after: no goals
tactic: rw [prod_const_one]
Theorem: Multiset.map_bind
File: Mathlib/Data/Multiset/Bind.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : α → Multiset β
f : β → γ
⊢ map f (m.bind n) = m.bind fun a => map f (n a)
state_after: no goals
tactic: simp [bind]
Theorem: NNReal.one_le_sqrt
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x y : ℝ≥0
⊢ 1 ≤ sqrt x ↔ 1 ≤ x
state_after: no goals
tactic: rw [← sqrt_one, sqrt_le_sqrt, sqrt_one]
Theorem: NonUnitalRingHom.map_srange
File: Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
inst✝⁶ : NonUnitalNonAssocSemiring R
M : Subsemigroup R
inst✝⁵ : NonUnitalNonAssocSemiring S
inst✝⁴ : NonUnitalNonAssocSemiring T
F : Type u_1
G : Type u_2
inst✝³ : FunLike F R S
inst✝² : NonUnitalRingHomClass F R S
inst✝¹ : FunLike G S T
inst✝ : NonUnitalRingHomClass G S T
f✝ : F
g✝ : G
g : S →ₙ+* T
f : R →ₙ+* S
⊢ map g (srange f) = srange (g.comp f)
state_after: no goals
tactic: simpa only [srange_eq_map] using (⊤ : NonUnitalSubsemiring R).map_map g f
Theorem: LinearIndependent.localization
File: Mathlib/RingTheory/Localization/Module.lean

Proof steps:
state_before: R : Type u_1
Rₛ : Type u_2
inst✝¹¹ : CommSemiring R
S : Submonoid R
inst✝¹⁰ : CommSemiring Rₛ
inst✝⁹ : Algebra R Rₛ
hT : IsLocalization S Rₛ
M : Type u_3
M' : Type u_4
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : Module Rₛ M
inst✝⁵ : IsScalarTower R Rₛ M
inst✝⁴ : AddCommMonoid M'
inst✝³ : Module R M'
inst✝² : Module Rₛ M'
inst✝¹ : IsScalarTower R Rₛ M'
f : M →ₗ[R] M'
inst✝ : IsLocalizedModule S f
ι : Type u_5
b : ι → M
hli : LinearIndependent R b
⊢ LinearIndependent Rₛ b
state_after: R : Type u_1
Rₛ : Type u_2
inst✝¹¹ : CommSemiring R
S : Submonoid R
inst✝¹⁰ : CommSemiring Rₛ
inst✝⁹ : Algebra R Rₛ
hT : IsLocalization S Rₛ
M : Type u_3
M' : Type u_4
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : Module Rₛ M
inst✝⁵ : IsScalarTower R Rₛ M
inst✝⁴ : AddCommMonoid M'
inst✝³ : Module R M'
inst✝² : Module Rₛ M'
inst✝¹ : IsScalarTower R Rₛ M'
f : M →ₗ[R] M'
inst✝ : IsLocalizedModule S f
ι : Type u_5
b : ι → M
hli : LinearIndependent R b
this : IsLocalizedModule S LinearMap.id
⊢ LinearIndependent Rₛ b
tactic: have := isLocalizedModule_id S M Rₛ
state_before: R : Type u_1
Rₛ : Type u_2
inst✝¹¹ : CommSemiring R
S : Submonoid R
inst✝¹⁰ : CommSemiring Rₛ
inst✝⁹ : Algebra R Rₛ
hT : IsLocalization S Rₛ
M : Type u_3
M' : Type u_4
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : Module Rₛ M
inst✝⁵ : IsScalarTower R Rₛ M
inst✝⁴ : AddCommMonoid M'
inst✝³ : Module R M'
inst✝² : Module Rₛ M'
inst✝¹ : IsScalarTower R Rₛ M'
f : M →ₗ[R] M'
inst✝ : IsLocalizedModule S f
ι : Type u_5
b : ι → M
hli : LinearIndependent R b
this : IsLocalizedModule S LinearMap.id
⊢ LinearIndependent Rₛ b
state_after: no goals
tactic: exact hli.of_isLocalizedModule Rₛ S .id
Theorem: Set.ncard_inter_add_ncard_union
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s✝ t✝ : Set α
f : α → β
s t : Set α
hs : autoParam s.Finite _auto✝
ht : autoParam t.Finite _auto✝
⊢ (s ∩ t).ncard + (s ∪ t).ncard = s.ncard + t.ncard
state_after: no goals
tactic: rw [add_comm, ncard_union_add_ncard_inter _ _ hs ht]
Theorem: ProbabilityTheory.Kernel.comap_id
File: Mathlib/Probability/Kernel/Composition.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
δ : Type u_5
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : β → γ
g : γ → α
κ : Kernel α β
⊢ κ.comap id ⋯ = κ
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
δ : Type u_5
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : β → γ
g : γ → α
κ : Kernel α β
a : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((κ.comap id ⋯) a) s✝ = (κ a) s✝
tactic: ext a
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
δ : Type u_5
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : β → γ
g : γ → α
κ : Kernel α β
a : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((κ.comap id ⋯) a) s✝ = (κ a) s✝
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
δ : Type u_5
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : β → γ
g : γ → α
κ : Kernel α β
a : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ (κ (id a)) s✝ = (κ a) s✝
tactic: rw [comap_apply]
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
δ : Type u_5
mγ : MeasurableSpace γ
mδ : MeasurableSpace δ
f : β → γ
g : γ → α
κ : Kernel α β
a : α
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ (κ (id a)) s✝ = (κ a) s✝
state_after: no goals
tactic: simp
Theorem: preimage_nhdsWithin_coinduced'
File: Mathlib/Topology/ContinuousOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
π : α → β
s : Set β
t : Set α
a : α
h : a ∈ t
hs : s ∈ 𝓝 (π a)
⊢ π ⁻¹' s ∈ 𝓝[t] a
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
π : α → β
s : Set β
t : Set α
a : { x // x ∈ t }
hs : s ∈ 𝓝 (π ↑a)
⊢ π ⁻¹' s ∈ 𝓝[t] ↑a
tactic: lift a to t using h
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
π : α → β
s : Set β
t : Set α
a : { x // x ∈ t }
hs : s ∈ 𝓝 (π ↑a)
⊢ π ⁻¹' s ∈ 𝓝[t] ↑a
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
π : α → β
s : Set β
t : Set α
a : { x // x ∈ t }
hs : (fun x => π ↑x) ⁻¹' s ∈ 𝓝 a
⊢ π ⁻¹' s ∈ 𝓝[t] ↑a
tactic: replace hs : (fun x : t => π x) ⁻¹' s ∈ 𝓝 a := preimage_nhds_coinduced hs
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
π : α → β
s : Set β
t : Set α
a : { x // x ∈ t }
hs : (fun x => π ↑x) ⁻¹' s ∈ 𝓝 a
⊢ π ⁻¹' s ∈ 𝓝[t] ↑a
state_after: no goals
tactic: rwa [← map_nhds_subtype_val, mem_map]
Theorem: Polynomial.derivative_X_sub_C_pow
File: Mathlib/Algebra/Polynomial/Derivative.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
c : R
m : ℕ
⊢ derivative ((X - C c) ^ m) = C ↑m * (X - C c) ^ (m - 1)
state_after: no goals
tactic: rw [derivative_pow, derivative_X_sub_C, mul_one]
Theorem: Set.preimage_mul_right_singleton
File: Mathlib/Data/Set/Pointwise/Basic.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Set α
a b : α
⊢ (fun x => x * a) ⁻¹' {b} = {b * a⁻¹}
state_after: no goals
tactic: rw [← image_mul_right', image_singleton]
Theorem: Subalgebra.comap_map_eq_self
File: Mathlib/RingTheory/Adjoin/Basic.lean

Proof steps:
state_before: R : Type uR
S✝ : Type uS
A : Type uA
B : Type uB
inst✝⁴ : CommSemiring R
inst✝³ : Ring A
inst✝² : Algebra R A
inst✝¹ : Ring B
inst✝ : Algebra R B
f : A →ₐ[R] B
S : Subalgebra R A
h : ⇑f ⁻¹' {0} ⊆ ↑S
⊢ comap f (map f S) = S
state_after: case h.e'_3
R : Type uR
S✝ : Type uS
A : Type uA
B : Type uB
inst✝⁴ : CommSemiring R
inst✝³ : Ring A
inst✝² : Algebra R A
inst✝¹ : Ring B
inst✝ : Algebra R B
f : A →ₐ[R] B
S : Subalgebra R A
h : ⇑f ⁻¹' {0} ⊆ ↑S
⊢ S = S ⊔ adjoin R (⇑f ⁻¹' {0})
tactic: convert comap_map_eq f S
state_before: case h.e'_3
R : Type uR
S✝ : Type uS
A : Type uA
B : Type uB
inst✝⁴ : CommSemiring R
inst✝³ : Ring A
inst✝² : Algebra R A
inst✝¹ : Ring B
inst✝ : Algebra R B
f : A →ₐ[R] B
S : Subalgebra R A
h : ⇑f ⁻¹' {0} ⊆ ↑S
⊢ S = S ⊔ adjoin R (⇑f ⁻¹' {0})
state_after: no goals
tactic: rwa [left_eq_sup, Algebra.adjoin_le_iff]
Theorem: Finset.map_toDual_min
File: Mathlib/Data/Finset/Lattice.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset α
⊢ WithTop.map (⇑toDual) s.min = (image (⇑toDual) s).max
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset α
⊢ WithTop.map (⇑toDual) s.min = s.sup (WithBot.some ∘ ⇑toDual)
tactic: rw [max_eq_sup_withBot, sup_image]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset α
⊢ WithTop.map (⇑toDual) s.min = s.sup (WithBot.some ∘ ⇑toDual)
state_after: no goals
tactic: exact congr_fun Option.map_id _
Theorem: Nat.card_fintypeIoc
File: Mathlib/Order/Interval/Finset/Nat.lean

Proof steps:
state_before: a b c : ℕ
⊢ Fintype.card ↑(Set.Ioc a b) = b - a
state_after: no goals
tactic: rw [Fintype.card_ofFinset, card_Ioc]
Theorem: EuclideanGeometry.dist_div_cos_oangle_right_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
⊢ dist p₃ p₂ / (∡ p₂ p₃ p₁).cos = dist p₁ p₃
state_after: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₂ p₃ p₁).sign = 1
⊢ dist p₃ p₂ / (∡ p₂ p₃ p₁).cos = dist p₁ p₃
tactic: have hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₂ p₃ p₁).sign = 1
⊢ dist p₃ p₂ / (∡ p₂ p₃ p₁).cos = dist p₁ p₃
state_after: no goals
tactic: rw [oangle_eq_angle_of_sign_eq_one hs, Real.Angle.cos_coe,
    dist_div_cos_angle_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)
      (Or.inr (right_ne_of_oangle_eq_pi_div_two h))]
Theorem: ProbabilityTheory.Kernel.measurable_rnDerivAux
File: Mathlib/Probability/Kernel/RadonNikodym.lean

Proof steps:
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
⊢ Measurable fun p => κ.rnDerivAux η p.1 p.2
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
⊢ Measurable fun p =>
    if hα : Countable α then ((∂κ p.1/∂η p.1) p.2).toReal else (κ.map (fun a => (a, ())) ⋯).density η p.1 p.2 univ
tactic: simp_rw [rnDerivAux]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
⊢ Measurable fun p =>
    if hα : Countable α then ((∂κ p.1/∂η p.1) p.2).toReal else (κ.map (fun a => (a, ())) ⋯).density η p.1 p.2 univ
state_after: case pos
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
hα : Countable α
⊢ Measurable fun p => ((∂κ p.1/∂η p.1) p.2).toReal

case neg
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
hα : ¬Countable α
⊢ Measurable fun p => (κ.map (fun a => (a, ())) ⋯).density η p.1 p.2 univ
tactic: split_ifs with hα