isabelle


Constraining type variables in locales


The Isabelle library contains the classes real_inner and real_normed_vector, the latter of which is declared a subclass of the former in ~~src/HOL/Library/Inner_Product.thy.
Now, suppose we have a locale
locale foo =
fixes goo :: "'a::{real_normed_vector} => bool"
and wish to extend this locale with some new constants, and also constraining the sort of 'a to be real_inner at the same time, like so:
locale extended = foo +
fixes ext :: "'a::{real_inner} => nat"
Is there a way to do this? Trying to do this using the examples above sees Isabelle give goo the type 'b::{real_normed_vector} => bool in extended, when I instead require the type 'a::{real_inner} => bool.
You can do it like this:
locale extended = foo goo
for goo :: "'a :: real_inner ⇒ bool" +
fixes ext :: "'a => nat"

Related Links

Isabelle: changing an element inside a list
Unexpected corecursive call
Isabelle and class overloading
Proof of Simplification Rules
Isabelle session graph as a dot file
How to extract concrete values from defined options
Isabelle: Axiomatization and Quickcheck vs auto solve_direct
Isabelle proof error when calling sequential record operations
How do I state a lemma that does not respect sort constraints (for using OFCLASS)
Isabelle: linord proof
Outputting strings into a file from Isabelle/HOL
isabelle - Choose an arbitrary but fixed element
Associativity of word_cat from Word.thy
Isabelle - exI and refl behavior explanation needed
Well-definedness of function computing fixed point, in Isabelle
Isabelle - character and string literal support

Categories

HOME
ionic-framework
blogger
azure-data-factory
dictionary
raspberry-pi
electron
octobercms
cakephp-2.5
sqlite3
packages
binary-tree
ojdbc
networkx
mouse
applepay
awesome-wm
correlation
php-7.1
moonmail
percona
try-catch
netflix
ef-migrations
footer
pythonanywhere
django-cms
nodatime
kudan
lcd
xpages-ssjs
qhull
bootstrap-duallistbox
rst2pdf
c++-amp
unboundid
jspresso
fusionpbx
revolution-slider
android-browser
vapor
squib
email-templates
botbuilder
isbn
executenonquery
menuitem
flickr-api
apache-fop
pnotify
dotnetzip
idisposable
git-diff
recursive-datastructures
drupal-6
jxcore
pg-dump
media-player
boost-preprocessor
crosswalk-runtime
objective-c-swift-bridge
medium.com
ableton-live
thrust
clang-static-analyzer
revolution-r
xpath-1.0
system.management
teamcity-8.0
marching-cubes
quicklisp
php-ci
apache-commons-net
android-imagebutton
xcode-6.2
stxxl
prettify
terminal-services
ccss
file-locking
cos
sqlperformance
delphi-6
referrer
angularjs-controller
itmstransporter
chuck
coderush
cascalog
work-stealing
nsdatecomponents
boost-filesystem
psi
django-tagging
yetanotherforum

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App