isabelle - Quotienting a mutually recursive family of datatypes -


is possible quotient family of mutually recursive datatypes in isabelle/hol using quotient_type mechanism family of equivalence relations?

if so, there example of somewhere already? searching isabelle documentation, , paper describing revamped quotient_type mechanism, doesn't prove helpful.

the command quotient_type can handle 1 type @ time. if want quotient on several mutual types, must encoding , decoding manually, pretty simple.

suppose 2 types t1 , t2 equivalence relations r1 :: t1 => t1 => bool , r2 :: t2 => t2 => bool. then,

quotient_type q = "t1 + t2" / "rel_sum r1 r2" 

is combined quotient type. can define 2 quotients projections:

lift_definition abs1 :: "t1 ⇒ q" "inl" . lift_definition abs2 :: "t2 ⇒ q" "inr" .  typedef q1 = "range abs1" blast typedef q2 = "range abs2" blast 

with setup_lifting, can register q1 , q2 lifting package, too. then, decent automation lifting proofs , definitions. have 2 lifting steps (first t1 + t2 q , q q1 or q2) definitions , 2 unlifting steps proofs.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -