overriding-update

By julien

October 13, 2008

Contents

theory AxOverrAndUpd imports Main begin

we define a locale containing our symbols, the constant empty set and the first three axioms

locale ax123 = fixes over :: ′a ⇒ ′a ⇒ ′a (infixl ▷ 101 ) fixes min :: ′a ⇒ ′a ⇒ ′a (infixl ⊖ 102 ) fixes e :: ′a assumes idemp: f ▷ f = f assumes empty: f ⊖ f = e assumes swap: f ⊖ g ▷ g = g ▷ f

Then we define three different locales containing a different set of axioms. We use it to find proofs of some laws without using all the axioms.

locale ax1234 = ax123 +

assumes dbmin: f ⊖ (g ⊖ h) = f ⊖ g ▷ f ⊖ (f ⊖ h)

locale ax12345 = ax1234 + assumes distr: (f ▷ g) ⊖ h = (f ⊖ h) ▷ (g ⊖ h)

locale ax1235 = ax123 + assumes distr: (f ▷ g) ⊖ h = (f ⊖ h) ▷ (g ⊖ h)

lemma (in ax12345 ) eUf : shows e ▷ f = f ⟨proof ⟩

lemma (in ax12345 ) fUe: shows f ▷ e = f ⟨proof ⟩

lemma (in ax12345 ) fMe: shows f ⊖ e = f ⟨proof ⟩

lemma (in ax12345 ) overlap1 :

shows over (min f g) f = f ⟨proof ⟩

lemma (in ax12345 ) combrem: shows f ⊖ g ⊖ h = f ⊖ (g ▷ h)

⟨proof ⟩

lemma (in ax12345 ) partition1 :

shows over (min f (min f g)) (min f g) = f ⟨proof ⟩

lemma (in ax12345 ) eMf : shows e ⊖ f = e ⟨proof ⟩

lemma (in ax12345 ) weakswap: shows over f (min g f ) = over f g

⟨proof ⟩ lemma (in ax12345 ) fMgMg: shows (min (min f g) g) = min f g

⟨proof ⟩

lemma (in ax12345 ) partition2 :

shows over (min f g) (min f (min f g)) = f ⟨proof ⟩

lemma (in ax12345 ) fMgMf : shows f ⊖ g ⊖ f = e

⟨proof ⟩

lemma (in ax12345 ) overlap2 :

shows over f (min f g) = f ⟨proof ⟩

lemma (in ax12345 ) lem1 :

shows min f (over f g) = e ⟨proof ⟩

lemma (in ax12345 ) fUgUf :

shows over (over f g) f = over f g ⟨proof ⟩

lemma (in ax12345 ) weaksym: shows min (min f g) h = min (min f h) g ⟨proof ⟩

lemma (in ax12345 ) lem2 : shows over f (min g (min g f )) = f

⟨proof ⟩

lemma (in ax12345 ) lem3 : shows min f (min g f ) = f ⟨proof ⟩

lemma (in ax12345 ) lem4 : shows min (over (over f g) h) f = over (min g f ) (min h f )

⟨proof ⟩ lemma (in ax12345 ) assoc: shows over (over f g) h = over f (over g h)

⟨proof ⟩

lemma (in ax12345 ) weaksym3 : shows f ⊖ g ▷ f ⊖ h = f ⊖ h ▷ f ⊖ g ⟨proof ⟩

lemma (in ax12345 ) drem: shows f ⊖ (g ⊖ h) = f ⊖ (f ⊖ h) ▷ f ⊖ g

⟨proof ⟩

lemma (in ax12345 ) lem6 :

shows min (over f g) (min g f ) = f ⟨proof ⟩

lemma (in ax12345 ) lem7 :

shows min (over f g) (min h f ) = over f (min g h)

⟨proof ⟩

lemma (in ax12345 )

shows over (min f g) (min g h) = over (min g h) (min f g) ⟨proof ⟩

locale ax-restri = ax12345 + fixes dorestri::′a ⇒ ′a⇒ ′a (infixl ↓ 103 ) assumes restri: f ↓ g = f ⊖ (f ⊖ g)

lemma (in ax-restri) idemp2 :

shows f ↓ f = f ⟨proof ⟩

lemma (in ax-restri)

shows f ↓ g ▷ f = f ⟨proof ⟩

lemma (in ax-restri) lem9 : shows f ↓ g ⊖ g = e ⟨proof ⟩ lemma (in ax-restri) shows f ↓ g ↓ (h ⊖ g) = e ⟨proof ⟩

lemma (in ax-restri) lem11 : shows f ⊖ h ▷ f ⊖ f ↓ h = f ⊖ h ⟨proof ⟩

lemma (in ax-restri) lem12 : shows f ⊖ f ↓ h ▷ f ⊖ h = f ⊖ f ↓ h ⟨proof ⟩

lemma (in ax-restri) lem13 : shows f ⊖ f ↓ h = f ⊖ h ⟨proof ⟩

lemma (in ax-restri) shows dorestri f (dorestri g h) = dorestri (dorestri f g) h ⟨proof ⟩ lemma (in ax-restri) weaksymRes: shows dorestri (dorestri f g) h = dorestri (dorestri f h) g ⟨proof ⟩

lemma (in ax-restri) lem16 : shows min f (dorestri g h) = over (min f g) (min f h) ⟨proof ⟩

lemma (in ax-restri) shows min f (dorestri g h) = min f (dorestri h g) ⟨proof ⟩

lemma (in ax-restri) lem18 : shows (f ▷ g) ↓ h = f ↓ h ▷ g ↓ h

⟨proof ⟩ lemma (in ax-restri) lem19 : shows f ↓ (g ▷ h) = f ↓ g ▷ f ↓ h ⟨proof ⟩

lemma (in ax-restri) shows (f ▷ g) ↓ (f ▷ h) = f ▷ g ↓ h ⟨proof ⟩

lemma (in ax-restri) shows f ↓ (g ⊖ h) = f ↓ g ⊖ h ⟨proof ⟩

lemma (in ax-restri) lem22 : shows (f ⊖ g) ↓ h = f ↓ h ⊖ g ⟨proof ⟩

lemma (in ax-restri) shows (f ⊖ h) ↓ (g ⊖ h) = f ↓ g ⊖ h ⟨proof ⟩ lemma (in ax-restri) lem24 : shows f ⊖ g ▷ h ↓ g = h ↓ g ▷ f ⊖ g

⟨proof ⟩

lemma (in ax-restri) shows x ↓ y ⊖ z ▷ v ⊖ (y ▷ w) = v ⊖ (y ▷ w) ▷ (x ↓ y) ⊖ z

⟨proof ⟩

lemma (in ax-restri) shows x ↓ y ⊖ z ▷ v ⊖ (x ▷ w) = v ⊖ (x ▷ w) ▷ x ↓ y ⊖ z

⟨proof ⟩

end