Last active
April 30, 2024 11:47
-
-
Save yoshihiro503/4a6e41f4da3763d4af6a573e39e2cf3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From mathcomp Require Import all_ssreflect. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
(* :> を複数持つと予期せぬことがおきることがあるぞ *) | |
Structure S : Type := MakeS { | |
sort2 :> Type; | |
sort :> Type; | |
op : sort -> sort -> bool; | |
}. | |
Inductive mybool := Yes | No. | |
Definition natS : S := @MakeS nat nat eqn. | |
Definition boolS : S := @MakeS mybool bool eqb. | |
Let f := fun (s : S) (x : s) => x. | |
Compute @f natS 3. | |
Compute @f boolS true. (* ←ここでエラー(8,9行目の順番を入れ替えるとエラーにならない) *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment