Lars Hupel
2018-08-28 13:34:34 UTC
Dear BNF experts,
I was wondering whether there is an elegant way to prove such properties
about BNFs:
lemma fmmap_total:
assumes "⋀k v. fmlookup m k = Some v ⟹ (∃v'. f v' = v)"
obtains m' where "m = fmmap f m'"
(this is for finite maps, but it could equally well work for lists)
I can prove this easily by induction, but it feels like there should be
a simpler way. Unfortunately, I can't figure it out.
Cheers
Lars
I was wondering whether there is an elegant way to prove such properties
about BNFs:
lemma fmmap_total:
assumes "⋀k v. fmlookup m k = Some v ⟹ (∃v'. f v' = v)"
obtains m' where "m = fmmap f m'"
(this is for finite maps, but it could equally well work for lists)
I can prove this easily by induction, but it feels like there should be
a simpler way. Unfortunately, I can't figure it out.
Cheers
Lars