thys2/ClosedForms.thy
author Chengsong
Wed, 09 Mar 2022 17:33:08 +0000
changeset 444 a7e98deebb5c
parent 443 c6351a96bf80
child 445 e072cfc2f2ee
permissions -rw-r--r--
restructured sizebound proof
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
444
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     1
theory ClosedForms imports
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     2
"BasicIdentities"
443
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
     3
begin
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
     4
444
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     5
lemma alts_closed_form: shows 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     6
"rsimp (rders_simp (RALTS rs) s) = 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     7
rsimp (RALTS (map (\<lambda>r. rders_simp r s) rs))"
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     8
  apply(induct s rule: rev_induct)
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
     9
   apply simp
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    10
  apply simp
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    11
  apply(subst rders_simp_append)
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    12
  apply(subgoal_tac " rsimp (rders_simp (rders_simp (RALTS rs) xs) [x]) = 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    13
 rsimp(rders_simp (rsimp_ALTs (rdistinct (rflts (map (rsimp \<circ> (\<lambda>r. rders_simp r xs)) rs)) {})) [x])")
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    14
   prefer 2
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    15
  apply (metis inside_simp_removal rders_simp_one_char)
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    16
  apply(simp only: )
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    17
  sorry
443
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    18
444
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    19
lemma alts_closed_form_variant: shows 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    20
"s \<noteq> [] \<Longrightarrow> rders_simp (RALTS rs) s = 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    21
rsimp (RALTS (map (\<lambda>r. rders_simp r s) rs))"
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    22
  sorry
443
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    23
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    24
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    25
444
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    26
lemma star_closed_form:
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    27
  shows "rders_simp (RSTAR r0) (c#s) = 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    28
rsimp ( RALTS ( (map (\<lambda>s1. RSEQ (rders_simp r0 s1) (RSTAR r0) ) (star_updates s r0 [[c]]) ) ))"
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    29
  apply(induct s)
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    30
   apply simp
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    31
  sorry
443
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    32
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    33
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    34
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    35
lemma seq_closed_form: shows 
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    36
"rsimp (rders_simp (RSEQ r1 r2) s) = 
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    37
rsimp ( RALTS ( (RSEQ (rders_simp r1 s) r2) # 
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    38
                (map (rders r2) (vsuf s r1)) 
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    39
              )  
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    40
      )"
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    41
  apply(induct s)
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    42
  apply simp
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    43
  sorry
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    44
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    45
444
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    46
lemma seq_closed_form_variant: shows
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    47
"s \<noteq> [] \<Longrightarrow> (rders_simp (RSEQ r1 r2) s) = 
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    48
rsimp (RALTS ((RSEQ (rders_simp r1 s) r2) # (map (rders_simp r2) (vsuf s r1))))"
443
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    49
  sorry
c6351a96bf80 writeupforclosedforms
Chengsong
parents:
diff changeset
    50
444
a7e98deebb5c restructured sizebound proof
Chengsong
parents: 443
diff changeset
    51
end