data61 / PSL

Other
65 stars 9 forks source link

UR: design decisions for the first prototype. #170

Open yutakang opened 4 years ago

yutakang commented 4 years ago
yutakang commented 4 years ago

Producing this structural proof script is too much work for little gain.

lemma "itrev xs [] = rev xs"
(*
  apply (subgoal_tac "⋀Nil. itrev xs Nil = rev xs @ Nil")
  apply fastforce
  apply (induct xs)
  apply auto
  done 
*)
proof -
  {
  fix ys
  have "itrev xs ys = rev xs @ ys"
    apply(induct xs arbitrary: ys)
     apply auto
    done
  }
  from this
  show "itrev xs [] = rev xs"
    apply fastforce
    done
qed
yutakang commented 4 years ago

specialisation: goal-oriented conjecturing (top-down).

datatype nat = zero ("0") | Suc nat

primrec plus:: "nat ⇒ nat ⇒ nat" where
  "plus  zero   y = y"
| "plus (Suc x) y = Suc (plus x y)"

lemma 4: "plus x (plus x x) = plus (plus x x) x"
  (*try_hard fails*)
  apply(subgoal_tac "⋀x y. plus x (plus y y) = plus (plus x y) y")
   apply fastforce
  apply(induct_tac x)
   apply auto
  done
yutakang commented 3 years ago

How do we mutate proof goals to produce conjectures?

yutakang commented 10 months ago

How do we mutate proof goals to produce conjectures?

  • term generalisation.
  • extension (done in our CICM2018 paper)
  • one-step unfolding

So far, these are done by ML functions. We should improve SeLFiE to make these.