l3lab/ntp-mathlib huggingface dataset:
protected theorem comp {g : β → γ} {f : α → β} (hg : QuasiMeasurePreserving g μb μc)
    (hf : QuasiMeasurePreserving f μa μb) : QuasiMeasurePreserving (g ∘ f) μa μc :=
  ⟨hg.measurable.comp hf.measurable, by
    rw [← map_map hg.1 hf.1]
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
g : β → γ
f : α → β
hg : QuasiMeasurePreserving g
hf : QuasiMeasurePreserving f
⊢ map g (map f μa) ≪ μc

Next tactic:
exact (hf.2.map hg.1).trans hg.2
theorem preimage_iterate_ae_eq {s : Set α} {f : α → α} (hf : QuasiMeasurePreserving f μ μ) (k : ℕ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : f^[k] ⁻¹' s =ᵐ[μ] s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
s : Set α
f : α → α
hf : QuasiMeasurePreserving f
k : ℕ
hs : f ⁻¹' s =ᵐ[μ] s
⊢ f^[k] ⁻¹' s =ᵐ[μ] s

Next tactic:
induction' k with k ih
theorem preimage_iterate_ae_eq {s : Set α} {f : α → α} (hf : QuasiMeasurePreserving f μ μ) (k : ℕ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : f^[k] ⁻¹' s =ᵐ[μ] s := by
  induction' k with k ih; · 

Proof state:
case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
s : Set α
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ f^[Nat.zero] ⁻¹' s =ᵐ[μ] s

Next tactic:
rfl
theorem preimage_iterate_ae_eq {s : Set α} {f : α → α} (hf : QuasiMeasurePreserving f μ μ) (k : ℕ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : f^[k] ⁻¹' s =ᵐ[μ] s := by
  induction' k with k ih; · rfl
  

Proof state:
case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
s : Set α
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
k : ℕ
ih : f^[k] ⁻¹' s =ᵐ[μ] s
⊢ f^[Nat.succ k] ⁻¹' s =ᵐ[μ] s

Next tactic:
rw [iterate_succ, preimage_comp]
theorem preimage_iterate_ae_eq {s : Set α} {f : α → α} (hf : QuasiMeasurePreserving f μ μ) (k : ℕ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : f^[k] ⁻¹' s =ᵐ[μ] s := by
  induction' k with k ih; · rfl
  rw [iterate_succ, preimage_comp]
  

Proof state:
case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
s : Set α
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
k : ℕ
ih : f^[k] ⁻¹' s =ᵐ[μ] s
⊢ f ⁻¹' (f^[k] ⁻¹' s) =ᵐ[μ] s

Next tactic:
exact EventuallyEq.trans (hf.preimage_ae_eq ih) hs
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
k : ℤ
hs : ⇑e '' s =ᵐ[μ] s
⊢ ⇑(e ^ k) '' s =ᵐ[μ] s

Next tactic:
rw [Equiv.image_eq_preimage]
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
k : ℤ
hs : ⇑e '' s =ᵐ[μ] s
⊢ ⇑(e ^ k).symm ⁻¹' s =ᵐ[μ] s

Next tactic:
obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · 

Proof state:
case intro.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
hs : ⇑e '' s =ᵐ[μ] s
k : ℕ
⊢ ⇑(e ^ ↑k).symm ⁻¹' s =ᵐ[μ] s

Next tactic:
replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · 

Proof state:
case hs
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
hs : ⇑e '' s =ᵐ[μ] s
k : ℕ
⊢ ⇑e⁻¹ ⁻¹' s =ᵐ[μ] s

Next tactic:
rwa [Equiv.image_eq_preimage] at hs
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    

Proof state:
case intro.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
k : ℕ
hs : ⇑e⁻¹ ⁻¹' s =ᵐ[μ] s
⊢ ⇑(e ^ ↑k).symm ⁻¹' s =ᵐ[μ] s

Next tactic:
replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    

Proof state:
case intro.inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
k : ℕ
hs : ⇑e⁻¹ ⁻¹' s =ᵐ[μ] s
he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s
⊢ ⇑(e ^ ↑k).symm ⁻¹' s =ᵐ[μ] s

Next tactic:
rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
  · 

Proof state:
case intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
hs : ⇑e '' s =ᵐ[μ] s
k : ℕ
⊢ ⇑(e ^ (-↑k)).symm ⁻¹' s =ᵐ[μ] s

Next tactic:
rw [zpow_neg, zpow_ofNat]
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
  · rw [zpow_neg, zpow_ofNat]
    

Proof state:
case intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
hs : ⇑e '' s =ᵐ[μ] s
k : ℕ
⊢ ⇑(e ^ k)⁻¹.symm ⁻¹' s =ᵐ[μ] s

Next tactic:
replace hs : e ⁻¹' s =ᵐ[μ] s
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
  · rw [zpow_neg, zpow_ofNat]
    replace hs : e ⁻¹' s =ᵐ[μ] s
    · 

Proof state:
case hs
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
hs : ⇑e '' s =ᵐ[μ] s
k : ℕ
⊢ ⇑e ⁻¹' s =ᵐ[μ] s

Next tactic:
convert he.preimage_ae_eq hs.symm
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
  · rw [zpow_neg, zpow_ofNat]
    replace hs : e ⁻¹' s =ᵐ[μ] s
    · convert he.preimage_ae_eq hs.symm
      

Proof state:
case h.e'_5
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
hs : ⇑e '' s =ᵐ[μ] s
k : ℕ
⊢ s = ⇑e ⁻¹' (⇑e '' s)

Next tactic:
rw [Equiv.preimage_image]
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
  · rw [zpow_neg, zpow_ofNat]
    replace hs : e ⁻¹' s =ᵐ[μ] s
    · convert he.preimage_ae_eq hs.symm
      rw [Equiv.preimage_image]
    

Proof state:
case intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he : QuasiMeasurePreserving ⇑e
he' : QuasiMeasurePreserving ⇑e.symm
k : ℕ
hs : ⇑e ⁻¹' s =ᵐ[μ] s
⊢ ⇑(e ^ k)⁻¹.symm ⁻¹' s =ᵐ[μ] s

Next tactic:
replace he : (⇑e)^[k] ⁻¹' s =ᵐ[μ] s := he.preimage_iterate_ae_eq k hs
theorem image_zpow_ae_eq {s : Set α} {e : α ≃ α} (he : QuasiMeasurePreserving e μ μ)
    (he' : QuasiMeasurePreserving e.symm μ μ) (k : ℤ) (hs : e '' s =ᵐ[μ] s) :
    (⇑(e ^ k)) '' s =ᵐ[μ] s := by
  rw [Equiv.image_eq_preimage]
  obtain ⟨k, rfl | rfl⟩ := k.eq_nat_or_neg
  · replace hs : (⇑e⁻¹) ⁻¹' s =ᵐ[μ] s
    · rwa [Equiv.image_eq_preimage] at hs
    replace he' : (⇑e⁻¹)^[k] ⁻¹' s =ᵐ[μ] s := he'.preimage_iterate_ae_eq k hs
    rwa [Equiv.Perm.iterate_eq_pow e⁻¹ k, inv_pow e k] at he'
  · rw [zpow_neg, zpow_ofNat]
    replace hs : e ⁻¹' s =ᵐ[μ] s
    · convert he.preimage_ae_eq hs.symm
      rw [Equiv.preimage_image]
    replace he : (⇑e)^[k] ⁻¹' s =ᵐ[μ] s := he.preimage_iterate_ae_eq k hs
    

Proof state:
case intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f : α → β
s : Set α
e : α ≃ α
he' : QuasiMeasurePreserving ⇑e.symm
k : ℕ
hs : ⇑e ⁻¹' s =ᵐ[μ] s
he : (⇑e)^[k] ⁻¹' s =ᵐ[μ] s
⊢ ⇑(e ^ k)⁻¹.symm ⁻¹' s =ᵐ[μ] s

Next tactic:
rwa [Equiv.Perm.iterate_eq_pow e k] at he
theorem limsup_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @limsup (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s :=
    -- Need `@` below because of diamond; see gh issue #16932
  haveI : ∀ n, (preimage f)^[n] s =ᵐ[μ] s := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ ∀ (n : ℕ), (preimage f)^[n] s =ᵐ[μ] s

Next tactic:
intro n
theorem limsup_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @limsup (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s :=
    -- Need `@` below because of diamond; see gh issue #16932
  haveI : ∀ n, (preimage f)^[n] s =ᵐ[μ] s := by
    intro n
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
n : ℕ
⊢ (preimage f)^[n] s =ᵐ[μ] s

Next tactic:
induction' n with n ih
theorem limsup_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @limsup (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s :=
    -- Need `@` below because of diamond; see gh issue #16932
  haveI : ∀ n, (preimage f)^[n] s =ᵐ[μ] s := by
    intro n
    induction' n with n ih
    · 

Proof state:
case zero
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ (preimage f)^[Nat.zero] s =ᵐ[μ] s

Next tactic:
rfl
theorem limsup_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @limsup (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s :=
    -- Need `@` below because of diamond; see gh issue #16932
  haveI : ∀ n, (preimage f)^[n] s =ᵐ[μ] s := by
    intro n
    induction' n with n ih
    · rfl
    

Proof state:
case succ
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
n : ℕ
ih : (preimage f)^[n] s =ᵐ[μ] s
⊢ (preimage f)^[Nat.succ n] s =ᵐ[μ] s

Next tactic:
simpa only [iterate_succ', comp_apply] using ae_eq_trans (hf.ae_eq ih) hs
theorem liminf_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @liminf (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s := by
    -- Need `@` below because of diamond; see gh issue #16932
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ liminf (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s

Next tactic:
rw [← ae_eq_set_compl_compl, @Filter.liminf_compl (Set α)]
theorem liminf_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @liminf (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s := by
    -- Need `@` below because of diamond; see gh issue #16932
  rw [← ae_eq_set_compl_compl, @Filter.liminf_compl (Set α)]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' s =ᵐ[μ] s
⊢ limsup (compl ∘ fun n => (preimage f)^[n] s) atTop =ᵐ[μ] sᶜ

Next tactic:
rw [← ae_eq_set_compl_compl, ← preimage_compl] at hs
theorem liminf_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @liminf (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s := by
    -- Need `@` below because of diamond; see gh issue #16932
  rw [← ae_eq_set_compl_compl, @Filter.liminf_compl (Set α)]
  rw [← ae_eq_set_compl_compl, ← preimage_compl] at hs
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' sᶜ =ᵐ[μ] sᶜ
⊢ limsup (compl ∘ fun n => (preimage f)^[n] s) atTop =ᵐ[μ] sᶜ

Next tactic:
convert hf.limsup_preimage_iterate_ae_eq hs
theorem liminf_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @liminf (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s := by
    -- Need `@` below because of diamond; see gh issue #16932
  rw [← ae_eq_set_compl_compl, @Filter.liminf_compl (Set α)]
  rw [← ae_eq_set_compl_compl, ← preimage_compl] at hs
  convert hf.limsup_preimage_iterate_ae_eq hs
  

Proof state:
case h.e'_4.h.e'_4.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' sᶜ =ᵐ[μ] sᶜ
x✝ : ℕ
⊢ (compl ∘ fun n => (preimage f)^[n] s) x✝ = (preimage f)^[x✝] sᶜ

Next tactic:
ext1 n
theorem liminf_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : @liminf (Set α) ℕ _ (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s := by
    -- Need `@` below because of diamond; see gh issue #16932
  rw [← ae_eq_set_compl_compl, @Filter.liminf_compl (Set α)]
  rw [← ae_eq_set_compl_compl, ← preimage_compl] at hs
  convert hf.limsup_preimage_iterate_ae_eq hs
  ext1 n
  

Proof state:
case h.e'_4.h.e'_4.h.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
f✝¹ : α → β
μa μa' : Measure α
μb μb' : Measure β
μc : Measure γ
f✝ : α → β
f : α → α
hf : QuasiMeasurePreserving f
hs : f ⁻¹' sᶜ =ᵐ[μ] sᶜ
x✝ : ℕ
n : α
⊢ n ∈ (compl ∘ fun n => (preimage f)^[n] s) x✝ ↔ n ∈ (preimage f)^[x✝] sᶜ

Next tactic:
simp only [← Set.preimage_iterate_eq, comp_apply, preimage_compl]
@[to_additive]
theorem smul_ae_eq_of_ae_eq {G α : Type*} [Group G] [MulAction G α] [MeasurableSpace α]
    {s t : Set α} {μ : Measure α} (g : G)
    (h_qmp : QuasiMeasurePreserving (g⁻¹ • · : α → α) μ μ)
    (h_ae_eq : s =ᵐ[μ] t) : (g • s : Set α) =ᵐ[μ] (g • t : Set α) := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α✝
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α✝
s✝ s' t✝ : Set α✝
f✝ : α✝ → β
μa μa' : Measure α✝
μb μb' : Measure β
μc : Measure γ
f : α✝ → β
G : Type u_8
α : Type u_9
inst✝² : Group G
inst✝¹ : MulAction G α
inst✝ : MeasurableSpace α
s t : Set α
μ : Measure α
g : G
h_qmp : QuasiMeasurePreserving fun x => g⁻¹ • x
h_ae_eq : s =ᵐ[μ] t
⊢ g • s =ᵐ[μ] g • t

Next tactic:
simpa only [← preimage_smul_inv] using h_qmp.ae_eq h_ae_eq
@[to_additive]
theorem pairwise_aedisjoint_of_aedisjoint_forall_ne_one {G α : Type*} [Group G] [MulAction G α]
    [MeasurableSpace α] {μ : Measure α} {s : Set α}
    (h_ae_disjoint : ∀ (g) (_ : g ≠ (1 : G)), AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving (g • ·) μ μ) :
    Pairwise (AEDisjoint μ on fun g : G => g • s) := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α✝
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α✝
s✝ s' t : Set α✝
f : α✝ → β
G : Type u_8
α : Type u_9
inst✝² : Group G
inst✝¹ : MulAction G α
inst✝ : MeasurableSpace α
μ : Measure α
s : Set α
h_ae_disjoint : ∀ (g : G), g ≠ 1 → AEDisjoint μ (g • s) s
h_qmp : ∀ (g : G), QuasiMeasurePreserving fun x => g • x
⊢ Pairwise (AEDisjoint μ on fun g => g • s)

Next tactic:
intro g₁ g₂ hg