Dependent casts #
This file contains type classes for dependent or custom cast operations
This allows us to state theorems with more refined casts, without which we cannot make progress in proving them
class
DCast₂
(α : Sort u_1)
(β : α → Sort u_2)
(γ : (a : α) → β a → Sort u_3)
[DCast α β]
:
Sort (max (max (max 1 u_1) u_2) u_3)
DCast₂ is a type class for custom cast operations on a doubly-indexed type family γ a b,
given an underlying dependent cast DCast α β
We require the cast operation dcast₂, along with the property that dcast₂ reduces to id under
reflexivity.
Instances
class
DCast₃
(α : Sort u_1)
(β : α → Sort u_2)
(γ : (a : α) → β a → Sort u_3)
(δ : (a : α) → (b : β a) → γ a b → Sort u_4)
[DCast α β]
[DCast₂ α β γ]
:
Sort (max (max (max (max 1 u_1) u_2) u_3) u_4)
DCast₃ is a type class for custom cast operations on a triply-indexed type family δ a b c,
given underlying dependent casts DCast α β and DCast₂ α β γ
We require the cast operation dcast₃, along with the property that dcast₃ reduces to id under
reflexivity.
Instances
theorem
dcast₃_symm
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
[DCast α β]
[DCast₂ α β γ]
[DCast₃ α β γ δ]
{a a' : α}
{b : β a}
{b' : β a'}
{c : γ a b}
{c' : γ a' b'}
{d : δ a b c}
{d' : δ a' b' c'}
(ha : a = a')
(hb : dcast ha b = b')
(hc : dcast₂ ha hb c = c')
(hd : dcast₃ ha hb hc d = d')
:
@[simp]
theorem
dcast₃_trans
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
[DCast α β]
[DCast₂ α β γ]
[DCast₃ α β γ δ]
{a a' a'' : α}
{b : β a}
{b' : β a'}
{b'' : β a''}
{c : γ a b}
{c' : γ a' b'}
{c'' : γ a'' b''}
{d : δ a b c}
(ha : a = a')
(ha' : a' = a'')
(hb : dcast ha b = b')
(hb' : dcast ha' b' = b'')
(hc : dcast₂ ha hb c = c')
(hc' : dcast₂ ha' hb' c' = c'')
:
theorem
dcast₃_eq_dcast₃_iff
{α : Sort u_1}
{β : α → Sort u_2}
{γ : (a : α) → β a → Sort u_3}
{δ : (a : α) → (b : β a) → γ a b → Sort u_4}
[DCast α β]
[DCast₂ α β γ]
[DCast₃ α β γ δ]
{a a' : α}
{b : β a}
{b' : β a'}
{c : γ a b}
{c' : γ a' b'}
{d : δ a b c}
{d' : δ a' b' c'}
(ha : a = a')
(hb : dcast ha b = b')
(hc : dcast₂ ha hb c = c')
: