531 |
531 |
532 axioms |
532 axioms |
533 grefl: "gle(x, x)" gless_def: "gless(x, y) <-> gle(x, y) & x ~= y" |
533 grefl: "gle(x, x)" gless_def: "gless(x, y) <-> gle(x, y) & x ~= y" |
534 grefl': "gle'(x, x)" gless'_def: "gless'(x, y) <-> gle'(x, y) & x ~= y" |
534 grefl': "gle'(x, x)" gless'_def: "gless'(x, y) <-> gle'(x, y) & x ~= y" |
535 |
535 |
536 text {* Mixin not applied to locales further up the hierachy. *} |
536 text {* Setup *} |
537 |
537 |
538 locale mixin = reflexive |
538 locale mixin = reflexive |
539 begin |
539 begin |
540 lemmas less_thm = less_def |
540 lemmas less_thm = less_def |
541 end |
541 end |
545 show "mixin(gle)" by unfold_locales (rule grefl) |
545 show "mixin(gle)" by unfold_locales (rule grefl) |
546 note reflexive = this[unfolded mixin_def] |
546 note reflexive = this[unfolded mixin_def] |
547 show "reflexive.less(gle, x, y) <-> gless(x, y)" |
547 show "reflexive.less(gle, x, y) <-> gless(x, y)" |
548 by (simp add: reflexive.less_def[OF reflexive] gless_def) |
548 by (simp add: reflexive.less_def[OF reflexive] gless_def) |
549 qed |
549 qed |
550 |
|
551 thm le.less_def (* mixin not applied *) |
|
552 lemma "reflexive.less(gle, x, y) <-> gle(x, y) & x ~= y" by (rule le.less_def) |
|
553 thm le.less_thm (* mixin applied *) |
|
554 lemma "gless(x, y) <-> gle(x, y) & x ~= y" by (rule le.less_thm) |
|
555 |
|
556 lemma "reflexive.less(gle, x, y) <-> gle(x, y) & x ~= y" |
|
557 by (rule le.less_def) |
|
558 lemma "gless(x, y) <-> gle(x, y) & x ~= y" |
|
559 by (rule le.less_thm) |
|
560 |
550 |
561 text {* Mixin propagated along the locale hierarchy *} |
551 text {* Mixin propagated along the locale hierarchy *} |
562 |
552 |
563 locale mixin2 = mixin |
553 locale mixin2 = mixin |
564 begin |
554 begin |