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

Error defining dataype in Isabelle
Defining a function which returns functions in Isabelle
Defining functions between constants in Isabelle
Using the ordering locale with partial maps
Avoiding assumption with sledgehammer
Discriminant with Inequalities
Instances in locale declaration for Isabelle
How to interactively simplify a formula in a relational theory in Isabelle
Nonnegative Interval Integration
Widening the domain of a partial function
Automatically unfolding a record definition when accessor is used
Creating a datatype with inequalities in Isabelle
Isabelle Logic simple natural deduction test
Instantiating variables ending in a digit using where-attribute (Isabelle)
Using an existing definition in Isabelle/ Hol
Pending sort hypotheses

Categories

HOME
log4j
openmp
minimum-spanning-tree
fluentd
layout
dot
mean-stack
google-oauth
packages
jxls
win32gui
callback
angular-ui-bootstrap
swagger-ui
bs4
communication
volttron
zend-framework3
n-gram
gz
zebra-printers
ups
ghc
fatal-error
excel-vba-mac
google-cloud-speech
physics-engine
arabic
blazemeter
angular2-aot
vlsi
fgetcsv
filezilla
linkerd
web-api-testing
ping
compatibility
socialengine
bosh
phonegap
http-status-code-503
pdb
google-qpx-express-api
grails-3.1
y86
android-ble
simplexml
adobe-premiere
lto
az-application-insights
slick-3.0
wso2carbon
auto-update
fault
azure-application-gateway
dropbox-php
android-cursor
dtexec
windows-mobile-6.5
crosswalk-runtime
rotativa
radtreelist
gstreamer-0.10
disque
pagedlist
ready-api
qgraphicsview
sdf
rvest
yaws
livequery
goose
xna-4.0
cyclomatic-complexity
pundit
0xdbe
sniffer
cisco-ios
census
remobjects
dundas
angular-local-storage
android-nested-fragment
nsbutton
mechanize-ruby
resty-gwt
app42
viadeo
prettify
jsctypes
spring-io
web2py-modules
gwt-rpc
ember-app-kit
limejs
lcs
distutils
qtkit
bigcouch
netdna-api
pydot
yetanotherforum
file-comparison
vc90
ncqrs
anti-piracy
putchar
w3wp
geneva-server

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App