Effective Ranges: A tutorial for using C++2X rangeshttps://wg21.link/P2214 ## advice • always use range algorithms first ■ constrained, better errors ■ projections, superior results • view adapters first • don't be evil and write inscrutable pipelines ##0 码力 | 56 页 | 15.30 MB | 1 年前3
The Lean Reference Manual
Release 3.3.0Syntax 11 3.3 Implicit Arguments 13 3.4 Basic Data Types and Assertions 14 3.5 Constructors, Projections, and Matching 15 3.6 Structured Proofs 17 3.7 Computation 18 3.8 Axioms 19 4 Declarations \alpha $ or report an error if it fails. Lean supports anonymous constructor notation, anonymous projections, and various forms of match syntax, including destructuring $ \lambda $ and let. These, as well → a^n + b^n ≠ c^n def unbounded (f : N → N) : Prop := ∀ M, ∃ n, f n ≥ M ### 3.5 Constructors, Projections, and Matching Lean’s foundation, the Calculus of Inductive Constructions, supports the declaration0 码力 | 67 页 | 266.23 KB | 2 年前3
Agda User Manual v2.6.4.1signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private (continues allowed: -- third (cons _ (cons _ (cons x _))) = x Instead, you can use the record fields as projections: third str = str .tl .tl .hd The constructor can be used as usual in the right-hand side of definitions: their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record0 码力 | 311 页 | 1.38 MB | 2 年前3
Agda User Manual v2.6.4.3signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private (continues allowed: -- third (cons _ (cons _ (cons x _))) = x Instead, you can use the record fields as projections: third str = str .tl .tl .hd The constructor can be used as usual in the right-hand side of definitions: their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record0 码力 | 311 页 | 1.38 MB | 2 年前3
Agda User Manual v2.6.4.2signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private (continues allowed: -- third (cons _ (cons _ (cons x _))) = x Instead, you can use the record fields as projections: third str = str .tl .tl .hd The constructor can be used as usual in the right-hand side of definitions: their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record0 码力 | 311 页 | 1.38 MB | 2 年前3
Agda User Manual v2.6.4signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private (continues allowed: -- third (cons _ (cons _ (cons x _))) = x Instead, you can use the record fields as projections: third str = str .tl .tl .hd The constructor can be used as usual in the right-hand side of definitions: their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record0 码力 | 313 页 | 1.38 MB | 2 年前3
Agda User Manual v2.6.3signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private posZ : Z allowed: -- third (cons _ (cons _ (cons x _))) = x Instead, you can use the record fields as projections: third str = str .tl .tl .hd The constructor can be used as usual in the right-hand side of definitions: their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record0 码力 | 379 页 | 354.83 KB | 2 年前3
Agda User Manual v2.6.3signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private posZ allowed: -- third (cons _ (cons _ (cons x _))) = x Instead, you can use the record fields as projections: third str = str .tl .tl .hd The constructor can be used as usual in the right-hand side of definitions: their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record0 码力 | 288 页 | 1.24 MB | 2 年前3
Agda User Manual v2.6.2.2signatures, even when in an abstract block! To work around this we have to define aliases for the projections functions: -- A property about the representation of zero integers: abstract private posZ : Z their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record -> (x : Subset A P) -> P (Subset.elem x) certificate (a # p) = irrAx p Example 4. Irrelevant projections are justified by the irrelevance axiom. .unsquash' : ∀ {A} → Squash A → A unsquash' (squash0 码力 | 354 页 | 433.60 KB | 2 年前3
Agda User Manual v2.6.1.1their name with a dot in the definition of the record type. Projections for irrelevant fields are only created if option --irrelevant-projections is supplied (since Agda > 2.5.4). Example 1. A record inconsistency. This might be fixed in the future. --experimental-irrelevance and --irrelevant-projections; enables potentially unsound irrelevance features (irrelevant levels, irrelevant data matching time. We can for instance prove that any pair is equal to the pairing of its first and second projections, a property commonly called eta-equality: eta : (p@(a , b) : Σ A B) → p ≡ (a , b) eta p = refl0 码力 | 297 页 | 375.42 KB | 2 年前3
共 167 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
相关搜索词
C++2x rangesranges algorithmsprojectionsview adaptersconceptsLeanVSCodeEmacstheorempackage managerAgda语言参考类型检查编译器选项交互式开发Type CheckingInteractive ModeModulesCommand-Line Options编程语言性能调试安装交互模式type checkingcompilationexperimental featuresCubical Agda交互式模式模块系统自动化证明搜索Agda编程语言命令行选项Latex后端Search About错误处理警告标志模式匹配













