fact: Fixpoint size_rhanoi3 {n : nat} : _ _ n -> _ _ n -> nat := if n is n1.+1 then fun c1 c2 : configuration 3 n1.+1 => let p1 := c1 ldisk in let p2 := c2 ldisk in let c1' := ↓[c1] in let c2' := ↓[c2] in if p1 == p2 then size_rhanoi3 c1' c2' else let p := `p[p1, p2] in let m1 := size_rpeg c1' p + size_rpeg c2' p in let m2 := size_rpeg c1' p2 + 2 ^ n1 + size_rpeg c2' p1 in (minn m1 m2).+1 else fun _ _ => 0.
imports: mathcomp(all_ssreflect) hanoi(extra gdist ghanoi ghanoi3)