Documentation

CslibFrontier.Tactic.UniformRelabel

Relabeling and dropping uniform draws #

Main definitions #

theorem Cslib.Tactic.UniformRelabel.uniformOfFintype_map_bijective {α : Type u_1} {β : Type u_2} {γ : Type u_3} [Fintype α] [Nonempty α] [Fintype β] [Nonempty β] {f : α → β} (hf : Function.Bijective f) {g : β → γ} {g' : α → γ} (hg : ∀ (a : α), g' a = g (f a)) :

Internal tactic bridge lemma pushing PMF.map through a bijection of finite nonempty types.

theorem Cslib.Tactic.UniformRelabel.bind_const_of_eq {α : Type u_1} {β : Type u_2} (μ : PMF α) (f : α → PMF β) (g : PMF β) (h : ∀ (a : α), f a = g) :
μ.bind f = g

Internal tactic bridge lemma proving μ.bind f = g from ∀ a, f a = g.

relabel_uniform e [with x] relabels PMF.uniformOfFintype draws along e : α ≃ β or f : α → β. On a PMF equality it normalizes Bind/Pure/Map notation, collapses consecutive uniform draws along nested products when needed, applies uniformOfFintype_bind_bijective / uniformOfFintype_map_bijective, and auto-discharges standard bijectivities.

drop_uniform with x simplifies constant PMF.bind stages via PMF.bind_const and peels a leading PMF.bind draw μ.bind fun y => f y = g to f x = g via bind_const_of_eq.