lemma not_fic_crename_aux: assumes a: "fic M c""c♯(a,b)" shows"fic (M[a⊨c>b]) c" using a apply(nominal_induct M avoiding: c a b rule: trm.strong_induct) apply(auto dest!: fic_elims intro!: fic.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh) done
lemma not_fic_crename: assumes a: "¬(fic (M[a⊨c>b]) c)""c♯(a,b)" shows"¬(fic M c)" using a apply(auto dest: not_fic_crename_aux) done
lemma not_fin_crename_aux: assumes a: "fin M y" shows"fin (M[a⊨c>b]) y" using a apply(nominal_induct M avoiding: a b rule: trm.strong_induct) apply(auto dest!: fin_elims intro!: fin.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh) done
lemma not_fin_crename: assumes a: "¬(fin (M[a⊨c>b]) y)" shows"¬(fin M y)" using a apply(auto dest: not_fin_crename_aux) done
lemma crename_fresh_interesting1: fixes c::"coname" assumes a: "c♯(M[a⊨c>b])""c♯(a,b)" shows"c♯M" using a apply(nominal_induct M avoiding: c a b rule: trm.strong_induct) apply(auto split: if_splits simp add: abs_fresh) done
lemma crename_fresh_interesting2: fixes x::"name" assumes a: "x♯(M[a⊨c>b])" shows"x♯M" using a apply(nominal_induct M avoiding: x a b rule: trm.strong_induct) apply(auto split: if_splits simp add: abs_fresh abs_supp fin_supp fresh_atm) done
lemma fic_crename: assumes a: "fic (M[a⊨c>b]) c""c♯(a,b)" shows"fic M c" using a apply(nominal_induct M avoiding: c a b rule: trm.strong_induct) apply(auto dest!: fic_elims intro!: fic.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh
split: if_splits) apply(auto dest: crename_fresh_interesting1 simp add: fresh_prod fresh_atm) done
lemma fin_crename: assumes a: "fin (M[a⊨c>b]) x" shows"fin M x" using a apply(nominal_induct M avoiding: x a b rule: trm.strong_induct) apply(auto dest!: fin_elims intro!: fin.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh
split: if_splits) apply(auto dest: crename_fresh_interesting2 simp add: fresh_prod fresh_atm) done
lemma crename_NotR: assumes a: "R[a⊨c>b] = NotR (x).N c""x♯R""c♯(a,b)" shows"∃N'. (R = NotR (x).N' c) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b c x N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(name,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_NotR': assumes a: "R[a⊨c>b] = NotR (x).N c""x♯R""c♯a" shows"(∃N'. (R = NotR (x).N' c) ∧ N'[a⊨c>b] = N) ∨ (∃N'. (R = NotR (x).N' a) ∧ b=c ∧ N'[a⊨c>b] = N)" using a apply(nominal_induct R avoiding: a b c x N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm abs_fresh alpha trm.inject) apply(rule_tac x="[(name,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) apply(rule_tac x="[(name,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_NotR_aux: assumes a: "R[a⊨c>b] = NotR (x).N c" shows"(a=c ∧ a=b) ∨ (a≠c)" using a apply(nominal_induct R avoiding: a b c x N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma crename_NotL: assumes a: "R[a⊨c>b] = NotL <c>.N y""c♯(R,a,b)" shows"∃N'. (R = NotL <c>.N' y) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b c y N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(coname,c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_AndL1: assumes a: "R[a⊨c>b] = AndL1 (x).N y""x♯R" shows"∃N'. (R = AndL1 (x).N' y) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b x y N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(name1,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_AndL2: assumes a: "R[a⊨c>b] = AndL2 (x).N y""x♯R" shows"∃N'. (R = AndL2 (x).N' y) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b x y N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(name1,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_AndR_aux: assumes a: "R[a⊨c>b] = AndR <c>.M <d>.N e" shows"(a=e ∧ a=b) ∨ (a≠e)" using a apply(nominal_induct R avoiding: a b c d e M N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma crename_OrR1_aux: assumes a: "R[a⊨c>b] = OrR1 <c>.M e" shows"(a=e ∧ a=b) ∨ (a≠e)" using a apply(nominal_induct R avoiding: a b c e M rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma crename_OrR1: assumes a: "R[a⊨c>b] = OrR1 <c>.N d""c♯(R,a,b)""d♯(a,b)" shows"∃N'. (R = OrR1 <c>.N' d) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b c d N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(coname1,c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_OrR2_aux: assumes a: "R[a⊨c>b] = OrR2 <c>.M e" shows"(a=e ∧ a=b) ∨ (a≠e)" using a apply(nominal_induct R avoiding: a b c e M rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma crename_OrR2: assumes a: "R[a⊨c>b] = OrR2 <c>.N d""c♯(R,a,b)""d♯(a,b)" shows"∃N'. (R = OrR2 <c>.N' d) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b c d N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(coname1,c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_OrL: assumes a: "R[a⊨c>b] = OrL (x).M (y).N z""x♯(y,z,N,R)""y♯(x,z,M,R)" shows"∃M' N'. R = OrL (x).M' (y).N' z ∧ M'[a⊨c>b] = M ∧ N'[a⊨c>b] = N ∧ x♯N' ∧ y♯M'" using a apply(nominal_induct R avoiding: a b x y z M N rule: trm.strong_induct) apply(auto split: if_splits simp add: trm.inject alpha) apply(rule_tac x="[(name2,y)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(name1,x)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(name1,x)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(name2,y)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) apply(drule_tac s="trm2[a⊨c>b]"in sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_ImpL: assumes a: "R[a⊨c>b] = ImpL <c>.M (y).N z""c♯(a,b,N,R)""y♯(z,M,R)" shows"∃M' N'. R = ImpL <c>.M' (y).N' z ∧ M'[a⊨c>b] = M ∧ N'[a⊨c>b] = N ∧ c♯N' ∧ y♯M'" using a apply(nominal_induct R avoiding: a b c y z M N rule: trm.strong_induct) apply(auto split: if_splits simp add: trm.inject alpha) apply(rule_tac x="[(name1,y)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(coname,c)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(coname,c)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(name1,y)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) apply(drule_tac s="trm2[a⊨c>b]"in sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_ImpR_aux: assumes a: "R[a⊨c>b] = ImpR (x).<c>.M e" shows"(a=e ∧ a=b) ∨ (a≠e)" using a apply(nominal_induct R avoiding: x a b c e M rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma crename_ImpR: assumes a: "R[a⊨c>b] = ImpR (x).<c>.N d""c♯(R,a,b)""d♯(a,b)""x♯R" shows"∃N'. (R = ImpR (x).<c>.N' d) ∧ N'[a⊨c>b] = N" using a apply(nominal_induct R avoiding: a b x c d N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm abs_perm alpha abs_fresh trm.inject) apply(rule_tac x="[(name,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(rule_tac x="[(name,x)]∙[(coname1, c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_supp fin_supp abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma crename_ax2: assumes a: "N[a⊨c>b] = Ax x c" shows"∃d. N = Ax x d" using a apply(nominal_induct N avoiding: a b rule: trm.strong_induct) apply(auto split: if_splits) apply(simp add: trm.inject) done
lemma crename_interesting1: assumes a: "distinct [a,b,c]" shows"M[a⊨c>c][c⊨c>b] = M[c⊨c>b][a⊨c>b]" using a apply(nominal_induct M avoiding: a c b rule: trm.strong_induct) apply(auto simp add: rename_fresh simp add: trm.inject alpha) apply(blast) apply(rotate_tac 12) apply(drule_tac x="a"in meta_spec) apply(rotate_tac 15) apply(drule_tac x="c"in meta_spec) apply(rotate_tac 15) apply(drule_tac x="b"in meta_spec) apply(blast) apply(blast) apply(blast) done
lemma crename_interesting2: assumes a: "a≠c""a≠d""a≠b""c≠d""b≠c" shows"M[a⊨c>b][c⊨c>d] = M[c⊨c>d][a⊨c>b]" using a apply(nominal_induct M avoiding: a c b d rule: trm.strong_induct) apply(auto simp add: rename_fresh simp add: trm.inject alpha) done
lemma crename_interesting3: shows"M[a⊨c>c][x⊨n>y] = M[x⊨n>y][a⊨c>c]" apply(nominal_induct M avoiding: a c x y rule: trm.strong_induct) apply(auto simp add: rename_fresh simp add: trm.inject alpha) done
lemma nrename_interesting2: assumes a: "x≠z""x≠u""x≠y""z≠u""y≠z" shows"M[x⊨n>y][z⊨n>u] = M[z⊨n>u][x⊨n>y]" using a apply(nominal_induct M avoiding: x y z u rule: trm.strong_induct) apply(auto simp add: rename_fresh simp add: trm.inject alpha) done
lemma not_fic_nrename_aux: assumes a: "fic M c" shows"fic (M[x⊨n>y]) c" using a apply(nominal_induct M avoiding: c x y rule: trm.strong_induct) apply(auto dest!: fic_elims intro!: fic.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh) done
lemma not_fic_nrename: assumes a: "¬(fic (M[x⊨n>y]) c)" shows"¬(fic M c)" using a apply(auto dest: not_fic_nrename_aux) done
lemma fin_nrename: assumes a: "fin M z""z♯(x,y)" shows"fin (M[x⊨n>y]) z" using a apply(nominal_induct M avoiding: x y z rule: trm.strong_induct) apply(auto dest!: fin_elims intro!: fin.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh
split: if_splits) done
lemma nrename_fresh_interesting1: fixes z::"name" assumes a: "z♯(M[x⊨n>y])""z♯(x,y)" shows"z♯M" using a apply(nominal_induct M avoiding: x y z rule: trm.strong_induct) apply(auto split: if_splits simp add: abs_fresh abs_supp fin_supp) done
lemma nrename_fresh_interesting2: fixes c::"coname" assumes a: "c♯(M[x⊨n>y])" shows"c♯M" using a apply(nominal_induct M avoiding: x y c rule: trm.strong_induct) apply(auto split: if_splits simp add: abs_fresh abs_supp fin_supp fresh_atm) done
lemma fin_nrename2: assumes a: "fin (M[x⊨n>y]) z""z♯(x,y)" shows"fin M z" using a apply(nominal_induct M avoiding: x y z rule: trm.strong_induct) apply(auto dest!: fin_elims intro!: fin.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh
split: if_splits) apply(auto dest: nrename_fresh_interesting1 simp add: fresh_atm fresh_prod) done
lemma nrename_Cut: assumes a: "R[x⊨n>y] = Cut <c>.M (z).N""c♯(N,R)""z♯(x,y,M,R)" shows"∃M' N'. R = Cut <c>.M' (z).N' ∧ M'[x⊨n>y] = M ∧ N'[x⊨n>y] = N ∧ c♯N' ∧ z♯M'" using a apply(nominal_induct R avoiding: c y x z M N rule: trm.strong_induct) apply(auto split: if_splits) apply(simp add: trm.inject) apply(auto simp add: alpha fresh_atm) apply(rule_tac x="[(coname,c)]∙trm1"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(rule_tac x="[(name,z)]∙trm2"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(rule conjI) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) apply(auto simp add: fresh_atm)[1] apply(drule sym) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_NotR: assumes a: "R[x⊨n>y] = NotR (z).N c""z♯(R,x,y)" shows"∃N'. (R = NotR (z).N' c) ∧ N'[x⊨n>y] = N" using a apply(nominal_induct R avoiding: x y c z N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(name,z)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_NotL: assumes a: "R[x⊨n>y] = NotL <c>.N z""c♯R""z♯(x,y)" shows"∃N'. (R = NotL <c>.N' z) ∧ N'[x⊨n>y] = N" using a apply(nominal_induct R avoiding: x y c z N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(coname,c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_NotL_aux: assumes a: "R[x⊨n>y] = NotL <c>.N u" shows"(x=u ∧ x=y) ∨ (x≠u)" using a apply(nominal_induct R avoiding: y u c x N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma nrename_AndL1: assumes a: "R[x⊨n>y] = AndL1 (z).N u""z♯(R,x,y)""u♯(x,y)" shows"∃N'. (R = AndL1 (z).N' u) ∧ N'[x⊨n>y] = N" using a apply(nominal_induct R avoiding: z u x y N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(name1,z)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_AndL1_aux: assumes a: "R[x⊨n>y] = AndL1 (v).N u" shows"(x=u ∧ x=y) ∨ (x≠u)" using a apply(nominal_induct R avoiding: y u v x N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma nrename_AndL2: assumes a: "R[x⊨n>y] = AndL2 (z).N u""z♯(R,x,y)""u♯(x,y)" shows"∃N'. (R = AndL2 (z).N' u) ∧ N'[x⊨n>y] = N" using a apply(nominal_induct R avoiding: z u x y N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(name1,z)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_AndL2_aux: assumes a: "R[x⊨n>y] = AndL2 (v).N u" shows"(x=u ∧ x=y) ∨ (x≠u)" using a apply(nominal_induct R avoiding: y u v x N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma nrename_AndR: assumes a: "R[x⊨n>y] = AndR <c>.M <d>.N e""c♯(d,e,N,R)""d♯(c,e,M,R)" shows"∃M' N'. R = AndR <c>.M' <d>.N' e ∧ M'[x⊨n>y] = M ∧ N'[x⊨n>y] = N ∧ c♯N' ∧ d♯M'" using a apply(nominal_induct R avoiding: x y c d e M N rule: trm.strong_induct) apply(auto split: if_splits simp add: trm.inject alpha) apply(simp add: fresh_atm fresh_prod) apply(rule_tac x="[(coname1,c)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(coname1,c)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(coname2,d)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) apply(drule_tac s="trm2[x⊨n>y]"in sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_OrR1: assumes a: "R[x⊨n>y] = OrR1 <c>.N d""c♯(R,d)" shows"∃N'. (R = OrR1 <c>.N' d) ∧ N'[x⊨n>y] = N" using a apply(nominal_induct R avoiding: x y c d N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(coname1,c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_OrR2: assumes a: "R[x⊨n>y] = OrR2 <c>.N d""c♯(R,d)" shows"∃N'. (R = OrR2 <c>.N' d) ∧ N'[x⊨n>y] = N" using a apply(nominal_induct R avoiding: x y c d N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) apply(rule_tac x="[(coname1,c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_OrL: assumes a: "R[u⊨n>v] = OrL (x).M (y).N z""x♯(y,z,u,v,N,R)""y♯(x,z,u,v,M,R)""z♯(u,v)" shows"∃M' N'. R = OrL (x).M' (y).N' z ∧ M'[u⊨n>v] = M ∧ N'[u⊨n>v] = N ∧ x♯N' ∧ y♯M'" using a apply(nominal_induct R avoiding: u v x y z M N rule: trm.strong_induct) apply(auto split: if_splits simp add: trm.inject alpha fresh_prod fresh_atm) apply(rule_tac x="[(name1,x)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(name2,y)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(drule sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) apply(drule_tac s="trm2[u⊨n>v]"in sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_OrL_aux: assumes a: "R[x⊨n>y] = OrL (v).M (w).N u" shows"(x=u ∧ x=y) ∨ (x≠u)" using a apply(nominal_induct R avoiding: y x w u v M N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma nrename_ImpL: assumes a: "R[x⊨n>y] = ImpL <c>.M (u).N z""c♯(N,R)""u♯(y,x,z,M,R)""z♯(x,y)" shows"∃M' N'. R = ImpL <c>.M' (u).N' z ∧ M'[x⊨n>y] = M ∧ N'[x⊨n>y] = N ∧ c♯N' ∧ u♯M'" using a apply(nominal_induct R avoiding: u x c y z M N rule: trm.strong_induct) apply(auto split: if_splits simp add: trm.inject alpha fresh_prod fresh_atm) apply(rule_tac x="[(coname,c)]∙trm1"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(rule_tac x="[(name1,u)]∙trm2"in exI) apply(perm_simp) apply(auto simp add: abs_fresh fresh_left calc_atm fresh_prod fresh_atm)[1] apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(simp add: eqvts calc_atm) apply(drule_tac s="trm2[x⊨n>y]"in sym) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm fresh_prod fresh_atm) done
lemma nrename_ImpL_aux: assumes a: "R[x⊨n>y] = ImpL <c>.M (w).N u" shows"(x=u ∧ x=y) ∨ (x≠u)" using a apply(nominal_induct R avoiding: y x w u c M N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm alpha abs_fresh trm.inject) done
lemma nrename_ImpR: assumes a: "R[u⊨n>v] = ImpR (x).<c>.N d""c♯(R,d)""x♯(R,u,v)" shows"∃N'. (R = ImpR (x).<c>.N' d) ∧ N'[u⊨n>v] = N" using a apply(nominal_induct R avoiding: u v x c d N rule: trm.strong_induct) apply(auto split: if_splits simp add: fresh_prod fresh_atm abs_perm alpha abs_fresh trm.inject) apply(rule_tac x="[(name,x)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_fresh fresh_left calc_atm fresh_prod) apply(rule_tac x="[(name,x)]∙[(coname1, c)]∙trm"in exI) apply(perm_simp) apply(simp add: abs_supp fin_supp abs_fresh fresh_left calc_atm fresh_prod) apply(drule sym) apply(drule pt_bij1[OF pt_coname_inst,OF at_coname_inst]) apply(drule pt_bij1[OF pt_name_inst,OF at_name_inst]) apply(simp add: eqvts calc_atm) done
lemma nrename_ax2: assumes a: "N[x⊨n>y] = Ax z c" shows"∃z. N = Ax z c" using a apply(nominal_induct N avoiding: x y rule: trm.strong_induct) apply(auto split: if_splits) apply(simp add: trm.inject) done
lemma fic_nrename: assumes a: "fic (M[x⊨n>y]) c" shows"fic M c" using a apply(nominal_induct M avoiding: c x y rule: trm.strong_induct) apply(auto dest!: fic_elims intro!: fic.intros simp add: fresh_prod fresh_atm rename_fresh abs_fresh
split: if_splits) apply(auto dest: nrename_fresh_interesting2 simp add: fresh_prod fresh_atm) done
text \<open>helper-stuff to set up the induction\<close>
abbreviation
SNa_set :: "trm set"
where "SNa_set \<equiv> {M. SNa M}"
abbreviation
A_Redu_set :: "(trm\<times>trm) set"
where "A_Redu_set \<equiv> {(N,M)| M N. M \<longrightarrow>\<^sub>a N}"
lemma SNa_elim:
assumes a: "SNa M"
shows "(\<forall>M. (\<forall>N. M \<longrightarrow>\<^sub>a N \<longrightarrow> P N)\<longrightarrow> P M) \<longrightarrow> P M"
using a
by (induct rule: SNa.induct) (blast)
lemma my_wf_induct_triple:
assumes a: " wf(r1 <*lex*> r2 <*lex*> r3)" and b: "\<And>x. \<lbrakk>\<And>y. ((fst y,fst (snd y),snd (snd y)),(fst x,fst (snd x), snd (snd x)))
\<in> (r1 <*lex*> r2 <*lex*> r3) \<longrightarrow> P y\<rbrakk> \<Longrightarrow> P x"
shows "P x"
using a
apply(induct x rule: wf_induct_rule)
apply(rule b)
apply(simp)
done
lemma my_wf_induct_triple':
assumes a: " wf(r1 <*lex*> r2 <*lex*> r3)" and b: "\<And>x1 x2 x3. \<lbrakk>\<And>y1 y2 y3. ((y1,y2,y3),(x1,x2,x3)) \<in> (r1 <*lex*> r2 <*lex*> r3) \<longrightarrow> P (y1,y2,y3)\<rbrakk>
\<Longrightarrow> P (x1,x2,x3)"
shows "P (x1,x2,x3)"
apply(rule_tac my_wf_induct_triple[OF a])
apply(case_tac x rule: prod.exhaust)
apply(simp)
apply(rename_tac p a b)
apply(case_tac b)
apply(simp)
apply(rule b)
apply(blast)
done
lemma my_wf_induct_triple'':
assumes a: " wf(r1 <*lex*> r2 <*lex*> r3)" and b: "\<And>x1 x2 x3. \<lbrakk>\<And>y1 y2 y3. ((y1,y2,y3),(x1,x2,x3)) \<in> (r1 <*lex*> r2 <*lex*> r3) \<longrightarrow> P y1 y2 y3\<rbrakk>
\<Longrightarrow> P x1 x2 x3"
shows "P x1 x2 x3"
apply(rule_tac my_wf_induct_triple'[where P="\<lambda>(x1,x2,x3). P x1 x2 x3", simplified])
apply(rule a)
apply(rule b)
apply(auto)
done
lemma excluded_m:
assumes a: "<a>:M \<in> (\<parallel><B>\<parallel>)""(x):N \<in> (\<parallel>(B)\<parallel>)"
shows "(<a>:M \<in> BINDINGc B (\<parallel>(B)\<parallel>) \<or> (x):N \<in> BINDINGn B (\<parallel><B>\<parallel>))
\<or>\<not>(<a>:M \<in> BINDINGc B (\<parallel>(B)\<parallel>) \<or> (x):N \<in> BINDINGn B (\<parallel><B>\<parallel>))"
by (blast)
text \<open>The following two simplification rules are necessary because of the
new definition of lexicographic ordering\<close>
lemma ne_and_SNa_Redu[simp]: "M \<noteq> x \<and> (M,x) \<in> SNa_Redu \<longleftrightarrow> (M,x) \<in> SNa_Redu"
using wf_SNa_Redu by auto
lemma ne_and_less_size [simp]: "A \<noteq> B \<and> size A < size B \<longleftrightarrow> size A < size B"
by auto
fun
findn :: "(name\<times>coname\<times>trm) list\<Rightarrow>name\<Rightarrow>(coname\<times>trm) option"
where "findn [] x = None"
| "findn ((y,c,P)#\<theta>_n) x = (if y=x then Some (c,P) else findn \<theta>_n x)"
lemma findn_fresh:
assumes a: "x\<sharp>\<theta>_n"
shows "findn \<theta>_n x = None"
using a
apply(induct \<theta>_n)
apply(auto simp add: fresh_list_cons fresh_atm fresh_prod)
done
fun
findc :: "(coname\<times>name\<times>trm) list\<Rightarrow>coname\<Rightarrow>(name\<times>trm) option"
where "findc [] x = None"
| "findc ((c,y,P)#\<theta>_c) a = (if a=c then Some (y,P) else findc \<theta>_c a)"
lemma findc_eqvt[eqvt]:
fixes pi1::"name prm" and pi2::"coname prm"
shows "(pi1\<bullet>findc \<theta>_c a) = findc (pi1\<bullet>\<theta>_c) (pi1\<bullet>a)" and"(pi2\<bullet>findc \<theta>_c a) = findc (pi2\<bullet>\<theta>_c) (pi2\<bullet>a)"
apply(induct \<theta>_c)
apply(auto simp add: perm_bij)
done
lemma findc_fresh:
assumes a: "a\<sharp>\<theta>_c"
shows "findc \<theta>_c a = None"
using a
apply(induct \<theta>_c)
apply(auto simp add: fresh_list_cons fresh_atm fresh_prod)
done
abbreviation
nmaps :: "(name\<times>coname\<times>trm) list \<Rightarrow> name \<Rightarrow> (coname\<times>trm) option \<Rightarrow> bool" (\<open>_ nmaps _ to _\<close> [55,55,55] 55)
where "\<theta>_n nmaps x to P \<equiv> (findn \<theta>_n x) = P"
abbreviation
cmaps :: "(coname\<times>name\<times>trm) list \<Rightarrow> coname \<Rightarrow> (name\<times>trm) option \<Rightarrow> bool" (\<open>_ cmaps _ to _\<close> [55,55,55] 55)
where "\<theta>_c cmaps a to P \<equiv> (findc \<theta>_c a) = P"
lemma nmaps_fresh:
shows "\<theta>_n nmaps x to Some (c,P) \<Longrightarrow> a\<sharp>\<theta>_n \<Longrightarrow> a\<sharp>(c,P)"
apply(induct \<theta>_n)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
apply(case_tac "aa=x")
apply(auto)
apply(case_tac "aa=x")
apply(auto)
done
lemma cmaps_fresh:
shows "\<theta>_c cmaps a to Some (y,P) \<Longrightarrow> x\<sharp>\<theta>_c \<Longrightarrow> x\<sharp>(y,P)"
apply(induct \<theta>_c)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
apply(case_tac "a=aa")
apply(auto)
apply(case_tac "a=aa")
apply(auto)
done
lemma nmaps_false:
shows "\<theta>_n nmaps x to Some (c,P) \<Longrightarrow> x\<sharp>\<theta>_n \<Longrightarrow> False"
apply(induct \<theta>_n)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
done
lemma cmaps_false:
shows "\<theta>_c cmaps c to Some (x,P) \<Longrightarrow> c\<sharp>\<theta>_c \<Longrightarrow> False"
apply(induct \<theta>_c)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
done
fun
lookupa :: "name\<Rightarrow>coname\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm"
where "lookupa x a [] = Ax x a"
| "lookupa x a ((c,y,P)#\<theta>_c) = (if a=c then Cut <a>.Ax x a (y).P else lookupa x a \<theta>_c)"
lemma lookupa_eqvt[eqvt]:
fixes pi1::"name prm" and pi2::"coname prm"
shows "(pi1\<bullet>(lookupa x a \<theta>_c)) = lookupa (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_c)" and"(pi2\<bullet>(lookupa x a \<theta>_c)) = lookupa (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_c)"
apply -
apply(induct \<theta>_c)
apply(auto simp add: eqvts)
apply(induct \<theta>_c)
apply(auto simp add: eqvts)
done
lemma lookupa_fire:
assumes a: "\<theta>_c cmaps a to Some (y,P)"
shows "(lookupa x a \<theta>_c) = Cut <a>.Ax x a (y).P"
using a
apply(induct \<theta>_c arbitrary: x a y P)
apply(auto)
done
fun
lookupb :: "name\<Rightarrow>coname\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>coname\<Rightarrow>trm\<Rightarrow>trm"
where "lookupb x a [] c P = Cut <c>.P (x).Ax x a"
| "lookupb x a ((d,y,N)#\<theta>_c) c P = (if a=d then Cut <c>.P (y).N else lookupb x a \<theta>_c c P)"
lemma lookupb_eqvt[eqvt]:
fixes pi1::"name prm" and pi2::"coname prm"
shows "(pi1\<bullet>(lookupb x a \<theta>_c c P)) = lookupb (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_c) (pi1\<bullet>c) (pi1\<bullet>P)" and"(pi2\<bullet>(lookupb x a \<theta>_c c P)) = lookupb (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_c) (pi2\<bullet>c) (pi2\<bullet>P)"
apply -
apply(induct \<theta>_c)
apply(auto simp add: eqvts)
apply(induct \<theta>_c)
apply(auto simp add: eqvts)
done
fun
lookup :: "name\<Rightarrow>coname\<Rightarrow>(name\<times>coname\<times>trm) list\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm"
where "lookup x a [] \<theta>_c = lookupa x a \<theta>_c"
| "lookup x a ((y,c,P)#\<theta>_n) \<theta>_c = (if x=y then (lookupb x a \<theta>_c c P) else lookup x a \<theta>_n \<theta>_c)"
lemma lookup_eqvt[eqvt]:
fixes pi1::"name prm" and pi2::"coname prm"
shows "(pi1\<bullet>(lookup x a \<theta>_n \<theta>_c)) = lookup (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_n) (pi1\<bullet>\<theta>_c)" and"(pi2\<bullet>(lookup x a \<theta>_n \<theta>_c)) = lookup (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_n) (pi2\<bullet>\<theta>_c)"
apply -
apply(induct \<theta>_n)
apply(auto simp add: eqvts)
apply(induct \<theta>_n)
apply(auto simp add: eqvts)
done
fun
lookupc :: "name\<Rightarrow>coname\<Rightarrow>(name\<times>coname\<times>trm) list\<Rightarrow>trm"
where "lookupc x a [] = Ax x a"
| "lookupc x a ((y,c,P)#\<theta>_n) = (if x=y then P[c\<turnstile>c>a] else lookupc x a \<theta>_n)"
lemma lookupc_eqvt[eqvt]:
fixes pi1::"name prm" and pi2::"coname prm"
shows "(pi1\<bullet>(lookupc x a \<theta>_n)) = lookupc (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_n)" and"(pi2\<bullet>(lookupc x a \<theta>_n)) = lookupc (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_n)"
apply -
apply(induct \<theta>_n)
apply(auto simp add: eqvts)
apply(induct \<theta>_n)
apply(auto simp add: eqvts)
done
fun
lookupd :: "name\<Rightarrow>coname\<Rightarrow>(coname\<times>name\<times>trm) list\<Rightarrow>trm"
where "lookupd x a [] = Ax x a"
| "lookupd x a ((c,y,P)#\<theta>_c) = (if a=c then P[y\<turnstile>n>x] else lookupd x a \<theta>_c)"
lemma lookupd_eqvt[eqvt]:
fixes pi1::"name prm" and pi2::"coname prm"
shows "(pi1\<bullet>(lookupd x a \<theta>_n)) = lookupd (pi1\<bullet>x) (pi1\<bullet>a) (pi1\<bullet>\<theta>_n)" and"(pi2\<bullet>(lookupd x a \<theta>_n)) = lookupd (pi2\<bullet>x) (pi2\<bullet>a) (pi2\<bullet>\<theta>_n)"
apply -
apply(induct \<theta>_n)
apply(auto simp add: eqvts)
apply(induct \<theta>_n)
apply(auto simp add: eqvts)
done
lemma lookupa_fresh:
assumes a: "a\<sharp>\<theta>_c"
shows "lookupa y a \<theta>_c = Ax y a"
using a
apply(induct \<theta>_c)
apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
done
lemma lookupa_csubst:
assumes a: "a\<sharp>\<theta>_c"
shows "Cut <a>.Ax y a (x).P = (lookupa y a \<theta>_c){a:=(x).P}"
using a by (simp add: lookupa_fresh)
lemma lookupa_freshness:
fixes a::"coname" and x::"name"
shows "a\<sharp>(\<theta>_c,c) \<Longrightarrow> a\<sharp>lookupa y c \<theta>_c" and"x\<sharp>(\<theta>_c,y) \<Longrightarrow> x\<sharp>lookupa y c \<theta>_c"
apply(induct \<theta>_c)
apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
done
lemma lookupa_unicity:
assumes a: "lookupa x a \<theta>_c= Ax y b""b\<sharp>\<theta>_c""y\<sharp>\<theta>_c"
shows "x=y \<and> a=b"
using a
apply(induct \<theta>_c)
apply(auto simp add: trm.inject fresh_list_cons fresh_prod fresh_atm)
apply(case_tac "a=aa")
apply(auto)
apply(case_tac "a=aa")
apply(auto)
done
lemma lookupb_freshness:
fixes a::"coname" and x::"name"
shows "a\<sharp>(\<theta>_c,c,b,P) \<Longrightarrow> a\<sharp>lookupb y c \<theta>_c b P" and"x\<sharp>(\<theta>_c,y,P) \<Longrightarrow> x\<sharp>lookupb y c \<theta>_c b P"
apply(induct \<theta>_c)
apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
done
lemma lookupb_unicity:
assumes a: "lookupb x a \<theta>_c c P = Ax y b""b\<sharp>(\<theta>_c,c,P)""y\<sharp>\<theta>_c"
shows "x=y \<and> a=b"
using a
apply(induct \<theta>_c)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
apply(case_tac "a=aa")
apply(auto)
apply(case_tac "a=aa")
apply(auto)
done
lemma lookupb_lookupa:
assumes a: "x\<sharp>\<theta>_c"
shows "lookupb x c \<theta>_c a P = (lookupa x c \<theta>_c){x:=<a>.P}"
using a
apply(induct \<theta>_c)
apply(auto simp add: fresh_list_cons fresh_prod)
apply(generate_fresh "coname")
apply(generate_fresh "name")
apply(subgoal_tac "Cut <c>.Ax x c (aa).b = Cut <ca>.Ax x ca (caa).([(caa,aa)]\<bullet>b)")
apply(simp)
apply(rule sym)
apply(rule trans)
apply(rule better_Cut_substn)
apply(simp add: abs_fresh)
apply(simp)
apply(simp)
apply(subgoal_tac "x\<sharp>([(caa,aa)]\<bullet>b)")
apply(simp add: forget)
apply(simp add: trm.inject)
apply(auto simp add: fresh_left calc_atm fresh_prod fresh_atm)[1]
apply(simp add: trm.inject)
apply(rule conjI)
apply(simp add: alpha calc_atm fresh_atm fresh_prod)
apply(rule sym)
apply(simp add: alpha calc_atm fresh_atm fresh_prod)
done
lemma lookup_csubst:
assumes a: "a\<sharp>(\<theta>_n,\<theta>_c)"
shows "lookup y c \<theta>_n ((a,x,P)#\<theta>_c) = (lookup y c \<theta>_n \<theta>_c){a:=(x).P}"
using a
apply(induct \<theta>_n)
apply(auto simp add: fresh_prod fresh_list_cons)
apply(simp add: lookupa_csubst)
apply(simp add: lookupa_freshness forget fresh_atm fresh_prod)
apply(rule lookupb_csubst)
apply(simp)
apply(auto simp add: lookupb_freshness forget fresh_atm fresh_prod)
done
lemma lookup_fresh:
assumes a: "x\<sharp>(\<theta>_n,\<theta>_c)"
shows "lookup x c \<theta>_n \<theta>_c = lookupa x c \<theta>_c"
using a
apply(induct \<theta>_n)
apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
done
lemma lookupc_freshness:
fixes a::"coname" and x::"name"
shows "a\<sharp>(\<theta>_c,c) \<Longrightarrow> a\<sharp>lookupc y c \<theta>_c" and"x\<sharp>(\<theta>_c,y) \<Longrightarrow> x\<sharp>lookupc y c \<theta>_c"
apply(induct \<theta>_c)
apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
apply(rule rename_fresh)
apply(simp add: fresh_atm)
apply(rule rename_fresh)
apply(simp add: fresh_atm)
done
lemma lookupc_fresh:
assumes a: "y\<sharp>\<theta>_n"
shows "lookupc y a \<theta>_n = Ax y a"
using a
apply(induct \<theta>_n)
apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
done
lemma lookupc_nmaps:
assumes a: "\<theta>_n nmaps x to Some (c,P)"
shows "lookupc x a \<theta>_n = P[c\<turnstile>c>a]"
using a
apply(induct \<theta>_n)
apply(auto)
done
lemma lookupc_unicity:
assumes a: "lookupc y a \<theta>_n = Ax x b""x\<sharp>\<theta>_n"
shows "y=x"
using a
apply(induct \<theta>_n)
apply(auto simp add: trm.inject fresh_list_cons fresh_prod)
apply(case_tac "y=aa")
apply(auto)
apply(subgoal_tac "x\<sharp>(ba[aa\<turnstile>c>a])")
apply(simp add: fresh_atm)
apply(rule rename_fresh)
apply(simp)
done
lemma lookupd_fresh:
assumes a: "a\<sharp>\<theta>_c"
shows "lookupd y a \<theta>_c = Ax y a"
using a
apply(induct \<theta>_c)
apply(auto simp add: fresh_prod fresh_list_cons fresh_atm)
done
lemma lookupd_unicity:
assumes a: "lookupd y a \<theta>_c = Ax y b""b\<sharp>\<theta>_c"
shows "a=b"
using a
apply(induct \<theta>_c)
apply(auto simp add: trm.inject fresh_list_cons fresh_prod)
apply(case_tac "a=aa")
apply(auto)
apply(subgoal_tac "b\<sharp>(ba[aa\<turnstile>n>y])")
apply(simp add: fresh_atm)
apply(rule rename_fresh)
apply(simp)
done
lemma lookupd_freshness:
fixes a::"coname" and x::"name"
shows "a\<sharp>(\<theta>_c,c) \<Longrightarrow> a\<sharp>lookupd y c \<theta>_c" and"x\<sharp>(\<theta>_c,y) \<Longrightarrow> x\<sharp>lookupd y c \<theta>_c"
apply(induct \<theta>_c)
apply(auto simp add: fresh_prod fresh_list_cons abs_fresh fresh_atm)
apply(rule rename_fresh)
apply(simp add: fresh_atm)
apply(rule rename_fresh)
apply(simp add: fresh_atm)
done
lemma lookupd_cmaps:
assumes a: "\<theta>_c cmaps a to Some (x,P)"
shows "lookupd y a \<theta>_c = P[x\<turnstile>n>y]"
using a
apply(induct \<theta>_c)
apply(auto)
done
lemma stn_fresh:
fixes a::"coname" and x::"name"
shows "a\<sharp>(\<theta>_n,M) \<Longrightarrow> a\<sharp>stn M \<theta>_n" and"x\<sharp>(\<theta>_n,M) \<Longrightarrow> x\<sharp>stn M \<theta>_n"
apply(nominal_induct M avoiding: \<theta>_n a x rule: trm.strong_induct)
apply(auto simp add: abs_fresh fresh_prod fresh_atm)
apply(rule lookupc_freshness)
apply(simp add: fresh_atm)
apply(rule lookupc_freshness)
apply(simp add: fresh_atm)
done
lemma stc_fresh:
fixes a::"coname" and x::"name"
shows "a\<sharp>(\<theta>_c,M) \<Longrightarrow> a\<sharp>stc M \<theta>_c" and"x\<sharp>(\<theta>_c,M) \<Longrightarrow> x\<sharp>stc M \<theta>_c"
apply(nominal_induct M avoiding: \<theta>_c a x rule: trm.strong_induct)
apply(auto simp add: abs_fresh fresh_prod fresh_atm)
apply(rule lookupd_freshness)
apply(simp add: fresh_atm)
apply(rule lookupd_freshness)
apply(simp add: fresh_atm)
done
lemma case_option_eqvt1[eqvt_force]:
fixes pi1::"name prm" and pi2::"coname prm" and B::"(name\<times>trm) option" and r::"trm"
shows "(pi1\<bullet>(case B of Some (x,P) \<Rightarrow> s x P | None \<Rightarrow> r)) =
(case (pi1\<bullet>B) of Some (x,P) \<Rightarrow> (pi1\<bullet>s) x P | None \<Rightarrow> (pi1\<bullet>r))" and"(pi2\<bullet>(case B of Some (x,P) \<Rightarrow> s x P| None \<Rightarrow> r)) =
(case (pi2\<bullet>B) of Some (x,P) \<Rightarrow> (pi2\<bullet>s) x P | None \<Rightarrow> (pi2\<bullet>r))"
apply(cases "B")
apply(auto)
apply(perm_simp)
apply(cases "B")
apply(auto)
apply(perm_simp)
done
lemma case_option_eqvt2[eqvt_force]:
fixes pi1::"name prm" and pi2::"coname prm" and B::"(coname\<times>trm) option" and r::"trm"
shows "(pi1\<bullet>(case B of Some (x,P) \<Rightarrow> s x P | None \<Rightarrow> r)) =
(case (pi1\<bullet>B) of Some (x,P) \<Rightarrow> (pi1\<bullet>s) x P | None \<Rightarrow> (pi1\<bullet>r))" and"(pi2\<bullet>(case B of Some (x,P) \<Rightarrow> s x P| None \<Rightarrow> r)) =
(case (pi2\<bullet>B) of Some (x,P) \<Rightarrow> (pi2\<bullet>s) x P | None \<Rightarrow> (pi2\<bullet>r))"
apply(cases "B")
apply(auto)
apply(perm_simp)
apply(cases "B")
apply(auto)
apply(perm_simp)
done
lemma case_cong:
assumes a: "B1=B2""x1=x2""y1=y2"
shows "(case B1 of None \<Rightarrow> x1 | Some (x,P) \<Rightarrow> y1 x P) = (case B2 of None \<Rightarrow> x2 | Some (x,P) \<Rightarrow> y2 x P)"
using a
apply(auto)
done
lemma find_maps:
shows "\<theta>_c cmaps a to (findc \<theta>_c a)" and"\<theta>_n nmaps x to (findn \<theta>_n x)"
apply(auto)
done
definition
ncloses :: "(name\<times>coname\<times>trm) list\<Rightarrow>(name\<times>ty) list \<Rightarrow> bool" (\<open>_ ncloses _\<close> [55,55] 55)
where
"\<theta>_n ncloses \<Gamma> \<equiv> \<forall>x B. ((x,B) \<in> set \<Gamma> \<longrightarrow> (\<exists>c P. \<theta>_n nmaps x to Some (c,P) \<and> <c>:P \<in> (\<parallel><B>\<parallel>)))"
definition
ccloses :: "(coname\<times>name\<times>trm) list\<Rightarrow>(coname\<times>ty) list \<Rightarrow> bool" (\<open>_ ccloses _\<close> [55,55] 55)
where
"\<theta>_c ccloses \<Delta> \<equiv> \<forall>a B. ((a,B) \<in> set \<Delta> \<longrightarrow> (\<exists>x P. \<theta>_c cmaps a to Some (x,P) \<and> (x):P \<in> (\<parallel>(B)\<parallel>)))"
lemma ncloses_elim:
assumes a: "(x,B) \<in> set \<Gamma>"
and b: "\<theta>_n ncloses \<Gamma>"
shows "\<exists>c P. \<theta>_n nmaps x to Some (c,P) \<and> <c>:P \<in> (\<parallel><B>\<parallel>)"
using a b by (auto simp add: ncloses_def)
lemma ccloses_elim:
assumes a: "(a,B) \<in> set \<Delta>"
and b: "\<theta>_c ccloses \<Delta>"
shows "\<exists>x P. \<theta>_c cmaps a to Some (x,P) \<and> (x):P \<in> (\<parallel>(B)\<parallel>)"
using a b by (auto simp add: ccloses_def)
lemma ncloses_subset:
assumes a: "\<theta>_n ncloses \<Gamma>"
and b: "set \<Gamma>' \<subseteq> set \<Gamma>"
shows "\<theta>_n ncloses \<Gamma>'"
using a b by (auto simp add: ncloses_def)
lemma ccloses_subset:
assumes a: "\<theta>_c ccloses \<Delta>"
and b: "set \<Delta>' \<subseteq> set \<Delta>"
shows "\<theta>_c ccloses \<Delta>'"
using a b by (auto simp add: ccloses_def)
lemma validc_fresh:
fixes a::"coname"
and \<Delta>::"(coname\<times>ty) list"
assumes a: "a\<sharp>\<Delta>"
shows "\<not>(\<exists>B. (a,B)\<in>set \<Delta>)"
using a
apply(induct \<Delta>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
done
lemma validn_fresh:
fixes x::"name"
and \<Gamma>::"(name\<times>ty) list"
assumes a: "x\<sharp>\<Gamma>"
shows "\<not>(\<exists>B. (x,B)\<in>set \<Gamma>)"
using a
apply(induct \<Gamma>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
done
inductive
typing :: "ctxtn \<Rightarrow> trm \<Rightarrow> ctxtc \<Rightarrow> bool" (\<open>_ \<turnstile> _ \<turnstile> _\<close> [100,100,100] 100)
where
TAx: "\<lbrakk>validn \<Gamma>;validc \<Delta>; (x,B)\<in>set \<Gamma>; (a,B)\<in>set \<Delta>\<rbrakk> \<Longrightarrow> \<Gamma> \<turnstile> Ax x a \<turnstile> \<Delta>"
| TNotR: "\<lbrakk>x\<sharp>\<Gamma>; ((x,B)#\<Gamma>) \<turnstile> M \<turnstile> \<Delta>; set \<Delta>' = {(a,NOT B)}\<union>set \<Delta>; validc \<Delta>'\<rbrakk>
\<Longrightarrow> \<Gamma> \<turnstile> NotR (x).M a \<turnstile> \<Delta>'"
| TNotL: "\<lbrakk>a\<sharp>\<Delta>; \<Gamma> \<turnstile> M \<turnstile> ((a,B)#\<Delta>); set \<Gamma>' = {(x,NOT B)} \<union> set \<Gamma>; validn \<Gamma>'\<rbrakk>
\<Longrightarrow> \<Gamma>' \<turnstile> NotL <a>.M x \<turnstile> \<Delta>"
| TAndL1: "\<lbrakk>x\<sharp>(\<Gamma>,y); ((x,B1)#\<Gamma>) \<turnstile> M \<turnstile> \<Delta>; set \<Gamma>' = {(y,B1 AND B2)} \<union> set \<Gamma>; validn \<Gamma>'\<rbrakk>
\<Longrightarrow> \<Gamma>' \<turnstile> AndL1 (x).M y \<turnstile> \<Delta>"
| TAndL2: "\<lbrakk>x\<sharp>(\<Gamma>,y); ((x,B2)#\<Gamma>) \<turnstile> M \<turnstile> \<Delta>; set \<Gamma>' = {(y,B1 AND B2)} \<union> set \<Gamma>; validn \<Gamma>'\<rbrakk>
\<Longrightarrow> \<Gamma>' \<turnstile> AndL2 (x).M y \<turnstile> \<Delta>"
| TAndR: "\<lbrakk>a\<sharp>(\<Delta>,N,c); b\<sharp>(\<Delta>,M,c); a\<noteq>b; \<Gamma> \<turnstile> M \<turnstile> ((a,B)#\<Delta>); \<Gamma> \<turnstile> N \<turnstile> ((b,C)#\<Delta>);
set \<Delta>' = {(c,B AND C)}\<union>set \<Delta>; validc \<Delta>'\<rbrakk>
\<Longrightarrow> \<Gamma> \<turnstile> AndR <a>.M <b>.N c \<turnstile> \<Delta>'"
| TOrL: "\<lbrakk>x\<sharp>(\<Gamma>,N,z); y\<sharp>(\<Gamma>,M,z); x\<noteq>y; ((x,B)#\<Gamma>) \<turnstile> M \<turnstile> \<Delta>; ((y,C)#\<Gamma>) \<turnstile> N \<turnstile> \<Delta>;
set \<Gamma>' = {(z,B OR C)} \<union> set \<Gamma>; validn \<Gamma>'\<rbrakk>
\<Longrightarrow> \<Gamma>' \<turnstile> OrL (x).M (y).N z \<turnstile> \<Delta>"
| TOrR1: "\<lbrakk>a\<sharp>(\<Delta>,b); \<Gamma> \<turnstile> M \<turnstile> ((a,B1)#\<Delta>); set \<Delta>' = {(b,B1 OR B2)}\<union>set \<Delta>; validc \<Delta>'\<rbrakk>
\<Longrightarrow> \<Gamma> \<turnstile> OrR1 <a>.M b \<turnstile> \<Delta>'"
| TOrR2: "\<lbrakk>a\<sharp>(\<Delta>,b); \<Gamma> \<turnstile> M \<turnstile> ((a,B2)#\<Delta>); set \<Delta>' = {(b,B1 OR B2)}\<union>set \<Delta>; validc \<Delta>'\<rbrakk>
\<Longrightarrow> \<Gamma> \<turnstile> OrR2 <a>.M b \<turnstile> \<Delta>'"
| TImpL: "\<lbrakk>a\<sharp>(\<Delta>,N); x\<sharp>(\<Gamma>,M,y); \<Gamma> \<turnstile> M \<turnstile> ((a,B)#\<Delta>); ((x,C)#\<Gamma>) \<turnstile> N \<turnstile> \<Delta>;
set \<Gamma>' = {(y,B IMP C)} \<union> set \<Gamma>; validn \<Gamma>'\<rbrakk>
\<Longrightarrow> \<Gamma>' \<turnstile> ImpL <a>.M (x).N y \<turnstile> \<Delta>"
| TImpR: "\<lbrakk>a\<sharp>(\<Delta>,b); x\<sharp>\<Gamma>; ((x,B)#\<Gamma>) \<turnstile> M \<turnstile> ((a,C)#\<Delta>); set \<Delta>' = {(b,B IMP C)}\<union>set \<Delta>; validc \<Delta>'\<rbrakk>
\<Longrightarrow> \<Gamma> \<turnstile> ImpR (x).<a>.M b \<turnstile> \<Delta>'"
| TCut: "\<lbrakk>a\<sharp>(\<Delta>,N); x\<sharp>(\<Gamma>,M); \<Gamma> \<turnstile> M \<turnstile> ((a,B)#\<Delta>); ((x,B)#\<Gamma>) \<turnstile> N \<turnstile> \<Delta>\<rbrakk>
\<Longrightarrow> \<Gamma> \<turnstile> Cut <a>.M (x).N \<turnstile> \<Delta>"
equivariance typing
lemma fresh_set_member:
fixes x::"name"
and a::"coname"
shows "x\<sharp>L \<Longrightarrow> e\<in>set L \<Longrightarrow> x\<sharp>e"
and "a\<sharp>L \<Longrightarrow> e\<in>set L \<Longrightarrow> a\<sharp>e"
by (induct L) (auto simp add: fresh_list_cons)
lemma fresh_subset:
fixes x::"name"
and a::"coname"
shows "x\<sharp>L \<Longrightarrow> set L' \<subseteq> set L \<Longrightarrow> x\<sharp>L'"
and "a\<sharp>L \<Longrightarrow> set L' \<subseteq> set L \<Longrightarrow> a\<sharp>L'"
apply(induct L' arbitrary: L)
apply(auto simp add: fresh_list_cons fresh_list_nil intro: fresh_set_member)
done
lemma fresh_subset_ext:
fixes x::"name"
and a::"coname"
shows "x\<sharp>L \<Longrightarrow> x\<sharp>e \<Longrightarrow> set L' \<subseteq> set (e#L) \<Longrightarrow> x\<sharp>L'"
and "a\<sharp>L \<Longrightarrow> a\<sharp>e \<Longrightarrow> set L' \<subseteq> set (e#L) \<Longrightarrow> a\<sharp>L'"
apply(induct L' arbitrary: L)
apply(auto simp add: fresh_list_cons fresh_list_nil intro: fresh_set_member)
done
lemma fresh_under_insert:
fixes x::"name"
and a::"coname"
and \<Gamma>::"ctxtn"
and \<Delta>::"ctxtc"
shows "x\<sharp>\<Gamma> \<Longrightarrow> x\<noteq>y \<Longrightarrow> set \<Gamma>' = insert (y,B) (set \<Gamma>) \<Longrightarrow> x\<sharp>\<Gamma>'"
and "a\<sharp>\<Delta> \<Longrightarrow> a\<noteq>c \<Longrightarrow> set \<Delta>' = insert (c,B) (set \<Delta>) \<Longrightarrow> a\<sharp>\<Delta>'"
apply(rule fresh_subset_ext(1))
apply(auto simp add: fresh_prod fresh_atm fresh_ty)
apply(rule fresh_subset_ext(2))
apply(auto simp add: fresh_prod fresh_atm fresh_ty)
done
lemma typing_implies_valid:
assumes a: "\<Gamma> \<turnstile> M \<turnstile> \<Delta>"
shows "validn \<Gamma> \<and> validc \<Delta>"
using a
apply(nominal_induct rule: typing.strong_induct)
apply(auto dest: validn_elim validc_elim)
done
lemma ty_perm:
fixes pi1::"name prm"
and pi2::"coname prm"
and B::"ty"
shows "pi1\<bullet>B=B" and "pi2\<bullet>B=B"
apply(nominal_induct B rule: ty.strong_induct)
apply(auto simp add: perm_string)
done
lemma ctxt_perm:
fixes pi1::"name prm"
and pi2::"coname prm"
and \<Gamma>::"ctxtn"
and \<Delta>::"ctxtc"
shows "pi2\<bullet>\<Gamma>=\<Gamma>" and "pi1\<bullet>\<Delta>=\<Delta>"
apply -
apply(induct \<Gamma>)
apply(auto simp add: calc_atm ty_perm)
apply(induct \<Delta>)
apply(auto simp add: calc_atm ty_perm)
done
lemma typing_Ax_elim1:
assumes a: "\<Gamma> \<turnstile> Ax x a \<turnstile> ((a,B)#\<Delta>)"
shows "(x,B)\<in>set \<Gamma>"
using a
apply(erule_tac typing.cases)
apply(simp_all add: trm.inject)
apply(auto)
apply(auto dest: validc_elim context_fresh)
done
lemma typing_Ax_elim2:
assumes a: "((x,B)#\<Gamma>) \<turnstile> Ax x a \<turnstile> \<Delta>"
shows "(a,B)\<in>set \<Delta>"
using a
apply(erule_tac typing.cases)
apply(simp_all add: trm.inject)
apply(auto dest!: validn_elim context_fresh)
done
lemma psubst_Ax_aux:
assumes a: "\<theta>_c cmaps a to Some (y,N)"
shows "lookupb x a \<theta>_c c P = Cut <c>.P (y).N"
using a
apply(induct \<theta>_c)
apply(auto)
done
lemma psubst_Ax:
assumes a: "\<theta>_n nmaps x to Some (c,P)"
and b: "\<theta>_c cmaps a to Some (y,N)"
shows "\<theta>_n,\<theta>_c<Ax x a> = Cut <c>.P (y).N"
using a b
apply(induct \<theta>_n)
apply(auto simp add: psubst_Ax_aux)
done
lemma psubst_Cut:
assumes a: "\<forall>x. M\<noteq>Ax x c"
and b: "\<forall>a. N\<noteq>Ax x a"
and c: "c\<sharp>(\<theta>_n,\<theta>_c,N)" "x\<sharp>(\<theta>_n,\<theta>_c,M)"
shows "\<theta>_n,\<theta>_c<Cut <c>.M (x).N> = Cut <c>.(\<theta>_n,\<theta>_c<M>) (x).(\<theta>_n,\<theta>_c<N>)"
using a b c
apply(simp)
done
lemma all_CAND:
assumes a: "\<Gamma> \<turnstile> M \<turnstile> \<Delta>"
and b: "\<theta>_n ncloses \<Gamma>"
and c: "\<theta>_c ccloses \<Delta>"
shows "SNa (\<theta>_n,\<theta>_c<M>)"
using a b c
proof(nominal_induct avoiding: \<theta>_n \<theta>_c rule: typing.strong_induct)
case (TAx \<Gamma> \<Delta> x B a \<theta>_n \<theta>_c)
then show ?case
apply -
apply(drule ncloses_elim)
apply(assumption)
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(erule conjE)+
apply(rule_tac s="Cut <c>.P (xa).Pa" and t="\<theta>_n,\<theta>_c<Ax x a>" in subst)
apply(rule sym)
apply(simp only: psubst_Ax)
apply(simp add: CUT_SNa)
done
next
case (TNotR x \<Gamma> B M \<Delta> \<Delta>' a \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(a,NOT B) \<in> set \<Delta>'")
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp)
apply(generate_fresh "coname")
apply(fresh_fun_simp)
apply(rule_tac B="NOT B" in CUT_SNa)
apply(simp)
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="c" in exI)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule conjI)
apply(rule fic.intros)
apply(rule psubst_fresh_coname)
apply(simp)
apply(simp)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule allI)+
apply(rule impI)
apply(simp add: psubst_nsubst[symmetric])
apply(drule_tac x="(x,aa,Pa)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(assumption)
apply(simp)
apply(blast)
done
next
case (TNotL a \<Delta> \<Gamma> M B \<Gamma>' x \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(x,NOT B) \<in> set \<Gamma>'")
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "name")
apply(fresh_fun_simp)
apply(rule_tac B="NOT B" in CUT_SNa)
apply(simp)
apply(rule NEG_intro)
apply(simp (no_asm))
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="a" in exI)
apply(rule_tac x="ca" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp del: NEGc.simps)
apply(rule conjI)
apply(rule fin.intros)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp (no_asm))
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp (no_asm))
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(blast)
done
next
case (TAndL1 x \<Gamma> y B1 M \<Delta> \<Gamma>' B2 \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(y,B1 AND B2) \<in> set \<Gamma>'")
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "name")
apply(fresh_fun_simp)
apply(rule_tac B="B1 AND B2" in CUT_SNa)
apply(simp)
apply(rule NEG_intro)
apply(simp (no_asm))
apply(rule disjI2)
apply(rule disjI2)
apply(rule disjI1)
apply(rule_tac x="x" in exI)
apply(rule_tac x="ca" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp del: NEGc.simps)
apply(rule conjI)
apply(rule fin.intros)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp (no_asm))
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp (no_asm))
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
apply(drule_tac x="(x,a,Pa)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(simp)
apply(drule meta_mp)
apply(assumption)
apply(assumption)
apply(blast)
done
next
case (TAndL2 x \<Gamma> y B2 M \<Delta> \<Gamma>' B1 \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(y,B1 AND B2) \<in> set \<Gamma>'")
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "name")
apply(fresh_fun_simp)
apply(rule_tac B="B1 AND B2" in CUT_SNa)
apply(simp)
apply(rule NEG_intro)
apply(simp (no_asm))
apply(rule disjI2)
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="x" in exI)
apply(rule_tac x="ca" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp del: NEGc.simps)
apply(rule conjI)
apply(rule fin.intros)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp (no_asm))
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp (no_asm))
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
apply(drule_tac x="(x,a,Pa)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(simp)
apply(drule meta_mp)
apply(assumption)
apply(assumption)
apply(blast)
done
next
case (TAndR a \<Delta> N c b M \<Gamma> B C \<Delta>' \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(c,B AND C) \<in> set \<Delta>'")
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp)
apply(generate_fresh "coname")
apply(fresh_fun_simp)
apply(rule_tac B="B AND C" in CUT_SNa)
apply(simp)
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="ca" in exI)
apply(rule_tac x="a" in exI)
apply(rule_tac x="b" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp)
apply(rule conjI)
apply(rule fic.intros)
apply(simp add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_coname)
apply(simp)
apply(simp)
apply(simp)
apply(simp add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_coname)
apply(simp)
apply(simp)
apply(simp)
apply(rule conjI)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp)
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule allI)+
apply(rule impI)
apply(simp add: psubst_csubst[symmetric])
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(assumption)
apply(assumption)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp)
apply(rule_tac x="b" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp)
apply(rule allI)+
apply(rule impI)
apply(simp add: psubst_csubst[symmetric])
apply(rotate_tac 14)
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(b,xa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(assumption)
apply(assumption)
apply(simp)
apply(blast)
done
next
case (TOrL x \<Gamma> N z y M B \<Delta> C \<Gamma>' \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(z,B OR C) \<in> set \<Gamma>'")
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "name")
apply(fresh_fun_simp)
apply(rule_tac B="B OR C" in CUT_SNa)
apply(simp)
apply(rule NEG_intro)
apply(simp (no_asm))
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="x" in exI)
apply(rule_tac x="y" in exI)
apply(rule_tac x="ca" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp del: NEGc.simps)
apply(rule conjI)
apply(rule fin.intros)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(rule conjI)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp del: NEGc.simps)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp del: NEGc.simps)
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
apply(drule_tac x="(x,a,Pa)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(assumption)
apply(drule meta_mp)
apply(assumption)
apply(assumption)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp del: NEGc.simps)
apply(rule_tac x="y" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp del: NEGc.simps)
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
apply(rotate_tac 14)
apply(drule_tac x="(y,a,Pa)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(assumption)
apply(drule meta_mp)
apply(assumption)
apply(assumption)
apply(blast)
done
next
case (TOrR1 a \<Delta> b \<Gamma> M B1 \<Delta>' B2 \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(b,B1 OR B2) \<in> set \<Delta>'")
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "coname")
apply(fresh_fun_simp)
apply(rule_tac B="B1 OR B2" in CUT_SNa)
apply(simp)
apply(rule disjI2)
apply(rule disjI2)
apply(rule disjI1)
apply(rule_tac x="a" in exI)
apply(rule_tac x="c" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule conjI)
apply(rule fic.intros)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_coname)
apply(simp)
apply(simp)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp (no_asm))
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp (no_asm))
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(simp)
apply(assumption)
apply(simp)
apply(blast)
done
next
case (TOrR2 a \<Delta> b \<Gamma> M B2 \<Delta>' B1 \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(b,B1 OR B2) \<in> set \<Delta>'")
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "coname")
apply(fresh_fun_simp)
apply(rule_tac B="B1 OR B2" in CUT_SNa)
apply(simp)
apply(rule disjI2)
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="a" in exI)
apply(rule_tac x="c" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule conjI)
apply(rule fic.intros)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_coname)
apply(simp)
apply(simp)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp (no_asm))
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp (no_asm))
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(simp)
apply(assumption)
apply(simp)
apply(blast)
done
next
case (TImpL a \<Delta> N x \<Gamma> M y B C \<Gamma>' \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(y,B IMP C) \<in> set \<Gamma>'")
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp del: NEGc.simps)
apply(generate_fresh "name")
apply(fresh_fun_simp)
apply(rule_tac B="B IMP C" in CUT_SNa)
apply(simp)
apply(rule NEG_intro)
apply(simp (no_asm))
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="x" in exI)
apply(rule_tac x="a" in exI)
apply(rule_tac x="ca" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp del: NEGc.simps)
apply(rule conjI)
apply(rule fin.intros)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(simp del: NEGc.simps add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_name)
apply(simp)
apply(simp)
apply(simp)
apply(rule conjI)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp del: NEGc.simps)
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp del: NEGc.simps)
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_csubst[symmetric])
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(assumption)
apply(simp)
apply(simp)
apply(assumption)
apply(assumption)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp del: NEGc.simps)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp del: NEGc.simps)
apply(rule allI)+
apply(rule impI)
apply(simp del: NEGc.simps add: psubst_nsubst[symmetric])
apply(rotate_tac 12)
apply(drule_tac x="(x,aa,Pa)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(rule ncloses_subset)
apply(assumption)
apply(blast)
apply(simp)
apply(simp)
apply(assumption)
apply(drule meta_mp)
apply(assumption)
apply(assumption)
apply(blast)
done
next
case (TImpR a \<Delta> b x \<Gamma> B M C \<Delta>' \<theta>_n \<theta>_c)
then show ?case
apply(simp)
apply(subgoal_tac "(b,B IMP C) \<in> set \<Delta>'")
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(simp)
apply(generate_fresh "coname")
apply(fresh_fun_simp)
apply(rule_tac B="B IMP C" in CUT_SNa)
apply(simp)
apply(rule disjI2)
apply(rule disjI2)
apply(rule_tac x="x" in exI)
apply(rule_tac x="a" in exI)
apply(rule_tac x="c" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule conjI)
apply(rule fic.intros)
apply(simp add: abs_fresh fresh_prod fresh_atm)
apply(rule psubst_fresh_coname)
apply(simp)
apply(simp)
apply(simp)
apply(rule conjI)
apply(rule allI)+
apply(rule impI)
apply(simp add: psubst_csubst[symmetric])
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,((a,z,Pa)#\<theta>_c)<M>" in exI)
apply(simp)
apply(rule allI)+
apply(rule impI)
apply(rule_tac t="\<theta>_n,((a,z,Pa)#\<theta>_c)<M>{x:=<aa>.Pb}" and
s="((x,aa,Pb)#\<theta>_n),((a,z,Pa)#\<theta>_c)<M>" in subst)
apply(rule psubst_nsubst)
apply(simp add: fresh_prod fresh_atm fresh_list_cons)
apply(drule_tac x="(x,aa,Pb)#\<theta>_n" in meta_spec)
apply(drule_tac x="(a,z,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(assumption)
apply(simp)
apply(simp)
apply(simp)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(auto intro: fresh_subset simp del: NEGc.simps)[1]
apply(simp)
apply(simp)
apply(assumption)
apply(rule allI)+
apply(rule impI)
apply(simp add: psubst_nsubst[symmetric])
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp)
apply(rule_tac x="a" in exI)
apply(rule_tac x="((x,ca,Q)#\<theta>_n),\<theta>_c<M>" in exI)
apply(simp)
apply(rule allI)+
apply(rule impI)
apply(rule_tac t="((x,ca,Q)#\<theta>_n),\<theta>_c<M>{a:=(xaa).Pa}" and
s="((x,ca,Q)#\<theta>_n),((a,xaa,Pa)#\<theta>_c)<M>" in subst)
apply(rule psubst_csubst)
apply(simp add: fresh_prod fresh_atm fresh_list_cons)
apply(drule_tac x="(x,ca,Q)#\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xaa,Pa)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(assumption)
apply(simp)
apply(simp)
apply(simp)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(rule ccloses_subset)
apply(assumption)
apply(blast)
apply(auto intro: fresh_subset simp del: NEGc.simps)[1]
apply(simp)
apply(simp)
apply(assumption)
apply(simp)
apply(blast)
done
next
case (TCut a \<Delta> N x \<Gamma> M B \<theta>_n \<theta>_c)
then show ?case
apply -
apply(case_tac "\<forall>y. M\<noteq>Ax y a")
apply(case_tac "\<forall>c. N\<noteq>Ax x c")
apply(simp)
apply(rule_tac B="B" in CUT_SNa)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp)
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule allI)
apply(rule allI)
apply(rule impI)
apply(simp add: psubst_csubst[symmetric]) (*?*)
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,P)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp)
apply(rule allI)
apply(rule allI)
apply(rule impI)
apply(simp add: psubst_nsubst[symmetric]) (*?*)
apply(rotate_tac 11)
apply(drule_tac x="(x,aa,P)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(drule_tac meta_mp)
apply(assumption)
apply(assumption)
(* cases at least one axiom *)
apply(simp (no_asm_use))
apply(erule exE)
apply(simp del: psubst.simps)
apply(drule typing_Ax_elim2)
apply(auto simp add: trm.inject)[1]
apply(rule_tac B="B" in CUT_SNa)
(* left term *)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGc_def)
apply(simp)
apply(rule_tac x="a" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<M>" in exI)
apply(simp)
apply(rule allI)+
apply(rule impI)
apply(drule_tac x="\<theta>_n" in meta_spec)
apply(drule_tac x="(a,xa,P)#\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(assumption)
apply(drule meta_mp)
apply(rule ccloses_extend)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(simp add: psubst_csubst[symmetric]) (*?*)
(* right term -axiom *)
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(erule conjE)
apply(frule_tac y="x" in lookupd_cmaps)
apply(drule cmaps_fresh)
apply(assumption)
apply(simp)
apply(subgoal_tac "(x):P[xa\<turnstile>n>x] = (xa):P")
apply(simp)
apply(simp add: ntrm.inject)
apply(simp add: alpha fresh_prod fresh_atm)
apply(rule sym)
apply(rule nrename_swap)
apply(simp)
(* M is axiom *)
apply(simp)
apply(auto)[1]
(* both are axioms *)
apply(rule_tac B="B" in CUT_SNa)
apply(drule typing_Ax_elim1)
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(erule conjE)
apply(frule_tac a="a" in lookupc_nmaps)
apply(drule_tac a="a" in nmaps_fresh)
apply(assumption)
apply(simp)
apply(subgoal_tac "<a>:P[c\<turnstile>c>a] = <c>:P")
apply(simp)
apply(simp add: ctrm.inject)
apply(simp add: alpha fresh_prod fresh_atm)
apply(rule sym)
apply(rule crename_swap)
apply(simp)
apply(drule typing_Ax_elim2)
apply(drule ccloses_elim)
apply(assumption)
apply(erule exE)+
apply(erule conjE)
apply(frule_tac y="x" in lookupd_cmaps)
apply(drule cmaps_fresh)
apply(assumption)
apply(simp)
apply(subgoal_tac "(x):P[xa\<turnstile>n>x] = (xa):P")
apply(simp)
apply(simp add: ntrm.inject)
apply(simp add: alpha fresh_prod fresh_atm)
apply(rule sym)
apply(rule nrename_swap)
apply(simp)
(* N is not axioms *)
apply(rule_tac B="B" in CUT_SNa)
(* left term *)
apply(drule typing_Ax_elim1)
apply(drule ncloses_elim)
apply(assumption)
apply(erule exE)+
apply(erule conjE)
apply(frule_tac a="a" in lookupc_nmaps)
apply(drule_tac a="a" in nmaps_fresh)
apply(assumption)
apply(simp)
apply(subgoal_tac "<a>:P[c\<turnstile>c>a] = <c>:P")
apply(simp)
apply(simp add: ctrm.inject)
apply(simp add: alpha fresh_prod fresh_atm)
apply(rule sym)
apply(rule crename_swap)
apply(simp)
apply(rule BINDING_implies_CAND)
apply(unfold BINDINGn_def)
apply(simp)
apply(rule_tac x="x" in exI)
apply(rule_tac x="\<theta>_n,\<theta>_c<N>" in exI)
apply(simp)
apply(rule allI)
apply(rule allI)
apply(rule impI)
apply(simp add: psubst_nsubst[symmetric]) (*?*)
apply(rotate_tac 10)
apply(drule_tac x="(x,aa,P)#\<theta>_n" in meta_spec)
apply(drule_tac x="\<theta>_c" in meta_spec)
apply(drule meta_mp)
apply(rule ncloses_extend)
apply(assumption)
apply(assumption)
apply(assumption)
apply(assumption)
apply(drule_tac meta_mp)
apply(assumption)
apply(assumption)
done
qed
primrec "idn" :: "(name\<times>ty) list\<Rightarrow>coname\<Rightarrow>(name\<times>coname\<times>trm) list" where "idn [] a = []"
| "idn (p#\<Gamma>) a = ((fst p),a,Ax (fst p) a)#(idn \<Gamma> a)"
primrec "idc" :: "(coname\<times>ty) list\<Rightarrow>name\<Rightarrow>(coname\<times>name\<times>trm) list" where "idc [] x = []"
| "idc (p#\<Delta>) x = ((fst p),x,Ax x (fst p))#(idc \<Delta> x)"
lemma idc_cmaps:
assumes a: "idc \<Delta> y cmaps b to Some (x,M)"
shows "M=Ax x b"
using a
apply(induct \<Delta>)
apply(auto)
apply(case_tac "b=a")
apply(auto)
done
lemma idn_nmaps:
assumes a: "idn \<Gamma> a nmaps x to Some (b,M)"
shows "M=Ax x b"
using a
apply(induct \<Gamma>)
apply(auto)
apply(case_tac "aa=x")
apply(auto)
done
lemma lookup1:
assumes a: "x\<sharp>(idn \<Gamma> b)"
shows "lookup x a (idn \<Gamma> b) \<theta>_c = lookupa x a \<theta>_c"
using a
apply(induct \<Gamma>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
done
lemma lookup2:
assumes a: "\<not>(x\<sharp>(idn \<Gamma> b))"
shows "lookup x a (idn \<Gamma> b) \<theta>_c = lookupb x a \<theta>_c b (Ax x b)"
using a
apply(induct \<Gamma>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
done
lemma lookup3:
assumes a: "a\<sharp>(idc \<Delta> y)"
shows "lookupa x a (idc \<Delta> y) = Ax x a"
using a
apply(induct \<Delta>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm)
done
lemma lookup4:
assumes a: "\<not>(a\<sharp>(idc \<Delta> y))"
shows "lookupa x a (idc \<Delta> y) = Cut <a>.(Ax x a) (y).Ax y a"
using a
apply(induct \<Delta>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
done
lemma lookup5:
assumes a: "a\<sharp>(idc \<Delta> y)"
shows "lookupb x a (idc \<Delta> y) c P = Cut <c>.P (x).Ax x a"
using a
apply(induct \<Delta>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
done
lemma lookup6:
assumes a: "\<not>(a\<sharp>(idc \<Delta> y))"
shows "lookupb x a (idc \<Delta> y) c P = Cut <c>.P (y).Ax y a"
using a
apply(induct \<Delta>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
done
lemma lookup7:
shows "lookupc x a (idn \<Gamma> b) = Ax x a"
apply(induct \<Gamma>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
done
lemma lookup8:
shows "lookupd x a (idc \<Delta> y) = Ax x a"
apply(induct \<Delta>)
apply(auto simp add: fresh_list_cons fresh_prod fresh_atm fresh_list_nil)
done
theorem ALL_SNa:
assumes a: "\<Gamma> \<turnstile> M \<turnstile> \<Delta>"
shows "SNa M"
proof -
fix x have "(idc \<Delta> x) ccloses \<Delta>" by (simp add: ccloses_id)
moreover
fix a have "(idn \<Gamma> a) ncloses \<Gamma>" by (simp add: ncloses_id)
ultimately have "SNa ((idn \<Gamma> a),(idc \<Delta> x)<M>)" using a by (simp add: all_CAND)
moreover
have "((idn \<Gamma> a),(idc \<Delta> x)<M>) \<longrightarrow>\<^sub>a* M" by (simp add: id_redu)
ultimately show "SNa M" by (simp add: a_star_preserves_SNa)
qed
end
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.419Bemerkung:
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.