Zulip Chat Archive

Stream: general

Topic: equality on filters to eq. on ultrafilters


Bernd Losert (Jan 12 2022 at 15:43):

import tactic
import order.filter.partial
import order.filter.ultrafilter
import order.filter.bases
import algebra.support

noncomputable theory
open set function filter classical
open_locale classical filter

variables {X Y Z : Type*}

example (f : X  Y) (𝒰 : ultrafilter X) (𝒱 : ultrafilter Y) (h : map f 𝒰 = 𝒱) : 𝒰.map f = 𝒱 := ???

I'm having trouble doing this example. I know that I need to useultrafilter.of_coe and ultrafilter.of_coe somehow, but I always get stuck.

Patrick Johnson (Jan 12 2022 at 15:53):

example (f : X  Y) (𝒰 : ultrafilter X) (𝒱 : ultrafilter Y) (h : map f 𝒰 = 𝒱) : 𝒰.map f = 𝒱 :=
by rw [ultrafilter.map, ultrafilter.of_compl_not_mem_iff]; cases 𝒱; congr; exact h

Patrick Massot (Jan 12 2022 at 15:59):

example (f : X  Y) (𝒰 : ultrafilter X) (𝒱 : ultrafilter Y) (h : map f 𝒰 = 𝒱) : 𝒰.map f = 𝒱 :=
by exact_mod_cast h

Patrick Massot (Jan 12 2022 at 16:00):

That's exactly the job of tactic#norm_cast and its cousins

Bernd Losert (Jan 12 2022 at 16:11):

Wow, what a nice tactic. Thanks.

Bernd Losert (Jan 12 2022 at 16:17):

Hmm... I'm getting an error when I try to use it.

Bernd Losert (Jan 12 2022 at 16:18):

Here's my code:

import tactic
import order.filter.partial
import order.filter.ultrafilter
import order.filter.bases
import algebra.support

noncomputable theory
open set function filter classical
open_locale classical filter

variables {X Y Z : Type*}

lemma ultrafilter_comap_set (f : X  Y) (A : set X) (𝒱 : ultrafilter Y) (h : f '' A  𝒱) :
 𝒰 : ultrafilter X, 𝒰.map f = 𝒱  A  𝒰 := begin
  -- 𝒰 will be the ultrafilter generated by the filter base { (f ⁻¹' V ∩ A) | V ∈ 𝒱 }
  let B₀ : set X := f⁻¹' (f '' A)  A,
  let  : filter_basis X := {
    sets := { (f ⁻¹' V  A) | V  𝒱 },
    nonempty := B₀, f '' A, h, rfl⟩,
    inter_sets := begin
      assume B : set X,
      assume B' : set X,
      rintro V : set Y, h₁ : V  𝒱, h₂ : f ⁻¹' V  A = B⟩,
      rintro V' : set Y, h₁' : V'  𝒱, h₂' : f ⁻¹' V'  A = B'⟩,
      let B'' := B  B',
      use B'',
      split,
      have h' : f ⁻¹' (V  V')  A = B'', from calc
        f ⁻¹' (V  V')  A = (f ⁻¹' V  f ⁻¹' V')  A : by rw set.preimage_inter
        ... = (f ⁻¹' V  A)  (f ⁻¹' V'  A) : by {ext, simp, tauto}
        ... = B  B' : by rw [h₂, h₂'],
      exact V  V', 𝒱.inter_sets h₁ h₁', h'⟩,
      simp [set.subset.rfl],
    end,
  },
  let  := ℬ.filter,
  have : A   := ℬ.mem_filter_iff.mpr B₀, f '' A, h, rfl⟩, set.inter_subset_right (f⁻¹' (f '' A)) A⟩,
  haveI : ℱ.ne_bot := sorry,
  let 𝒰 := ultrafilter.of ,
  use 𝒰,
  split,

  show 𝒰.map f = 𝒱, begin
    have :  (V : set Y), V  𝒱  f ⁻¹' V  , begin
      assume V : set Y,
      assume hV : V  𝒱,
      rw filter_basis.mem_filter_iff ,
      let B := f ⁻¹' V  A,
      use B,
      split,
      show B  , from V, hV, rfl⟩,
      show B  f ⁻¹' V, from set.inter_subset_left (f ⁻¹' V) A,
    end,
    have : map f 𝒰  𝒱, from calc
      map f 𝒰  map f  : filter.map_mono (ultrafilter.of_le )
      ...  𝒱 : by exact (filter.tendsto_def.mpr this),
    have : map f 𝒰 = 𝒱, from (𝒱.unique this),
    exact_mode_cast this, -- HERE IS WHERE IT FAILS
  end,

  show A  𝒰, sorry,
end

Floris van Doorn (Jan 12 2022 at 16:19):

you misspelled the tactic ;-)

Bernd Losert (Jan 12 2022 at 16:23):

In what way? exact_mode_castis a tactic and I am in tactic mode.

Alex J. Best (Jan 12 2022 at 16:24):

its exact mod cast

Bernd Losert (Jan 12 2022 at 16:26):

Hmm... how did that e get in there. Haha.

EDY SAUL CONDORHUANCA RIMACHI (Jan 12 2022 at 16:27):

Hi. I have this problem to install. AFTER WRITE THIS echo 'PATH="$HOME/.elan/bin:$PATH"' >> $HOME/.profile. APPEAR THIS ERROR bash: $HOME/.profile.: ambiguous redirect
How to fix?

Patrick Johnson (Jan 12 2022 at 16:30):

@EDY SAUL CONDORHUANCA RIMACHI Please ask your question in a new topic.


Last updated: Dec 20 2023 at 11:08 UTC