psubst_term_graph_aux_def: shows "psubst_term_graph_aux \<equiv> lfp (\<lambda>p x1 x2. (\<exists>psubst_term_aux f. x1 = (Unit, f) \<and> x2 = Unit) \<or> (\<exists>psubst_term_aux y f. x1 = (Var y, f) \<and> x2 = (case f $$ y of None \<Rightarrow> Var y | Some t \<Rightarrow> t)) \<or> (\<exists>psubst_term_aux y f t. x1 = (Lam y t, f) \<and> x2 = Lam y (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> atom y \<sharp> f \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux y f t. x1 = (Rec y t, f) \<and> x2 = Rec y (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> atom y \<sharp> f \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Inj1 t, f) \<and> x2 = Inj1 (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Inj2 t, f) \<and> x2 = Inj2 (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t1 t2 f. x1 = (Syntax.Pair t1 t2, f) \<and> x2 = Syntax.Pair (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f)) \<and> p (t1, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) \<and> p (t2, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Roll t, f) \<and> x2 = Roll (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux y f t1 t2. x1 = (Syntax.Let t1 y t2, f) \<and> x2 = Syntax.Let (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) y (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f)) \<and> atom y \<sharp> f \<and> p (t1, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) \<and> p (t2, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f))) \<or> (\<exists>psubst_term_aux t1 t2 f. x1 = (App t1 t2, f) \<and> x2 = App (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f)) \<and> p (t1, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) \<and> p (t2, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f))) \<or> (\<exists>psubst_term_aux t1 t2 t3 f. x1 = (Case t1 t2 t3, f) \<and> x2 = Case (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f)) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t3, f)) \<and> p (t1, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t1, f)) \<and> p (t2, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t2, f)) \<and> p (t3, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t3, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Prj1 t, f) \<and> x2 = Prj1 (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Prj2 t, f) \<and> x2 = Prj2 (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Unroll t, f) \<and> x2 = Unroll (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Auth t, f) \<and> x2 = Auth (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux t f. x1 = (Unauth t, f) \<and> x2 = Unauth (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))) \<or> (\<exists>psubst_term_aux h f. x1 = (Hash h, f) \<and> x2 = Hash h) \<or> (\<exists>psubst_term_aux h t f. x1 = (Hashed h t, f) \<and> x2 = Hashed h (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f)) \<and> p (t, f) (((\<lambda>uu_. uu_) \<circ> psubst_term_aux) (t, f))))"