Giter Club home page Giter Club logo

software-foundations's Introduction

software-foundations's People

Contributors

acarrico avatar anton-trunov avatar clayrat avatar ehamberg avatar jfdm avatar marcelinevq avatar yurrriq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

software-foundations's Issues

testFactorial1 not solvable with "Refl"

Using "Refl" as the solution for test_factorial1 (or 2) yields:

 |   When checking right hand side of testFactorial1 with expected type
 |           factorial 3 = 6
 |   
 |   Type mismatch between
 |           6 = 6 (Type of Refl)
 |   and
 |           factorial 3 = 6 (Expected type)
 |   
 |   Specifically:
 |           Type mismatch between
 |                   6
 |           and
 |                   factorial 3

This is important because (1) no other tactics have been introduced at this point and (2) later in the chapter, we explicitly claim that it is solvable that way:

Now that we've defined a few datatypes and functions, let's turn to stating and
proving properties of their behavior. Actually, we've already started doing
this: each of the functions beginning with \idr{test} in the previous sections
makes a precise claim about the behavior of some function on some particular
inputs. The proofs of these claims were always the same: use \idr{Refl} to check
that both sides contain identical values.

Edit Preface

For now, it's copied rather directly from the Coq.

Give @clayrat commit rights

@jfdm (or anyone else with sufficient permissions), could you please grant commit rights to @clayrat? At this point he's contributing more than I am, and I think it'd be nice if he and I (at least) could trade off reviews and merging.

It would also be good to set the default branch to develop (and/or grant me access to the repo settings). Related: #15

Cheers!

Write more idiomatic Idris

While this is a translation of a book written for/in Coq, we should use idiomatic Idris whenever possible.

Split/rewrite Tactics?

As discussed in #17, Pruviloj, as currently used in the Tactics chapter is probably too experimental to be introduced so early in the book.

My proposal is to re-do the first half with dependent pattern matching (possibly discussing its use vs rewrites), rename the chapter to smth like PatternMatching and keep the original half as an appendix named Tactics or even Pruviloj.

succ' unit test note solution

Poly.lidr note of:
https://github.com/idris-hackers/software-foundations/blob/develop/src/Poly.lidr#L1027

Can be solved written as:


succ' : (n : Nat' {x}) -> Nat' {x}
succ' n = \f, x => f (n f x)

succ'_1 : succ' Church.zero f x = one f x
succ'_1 = Refl

succ'_2 : succ' Church.one f x = two f x
succ'_2 = Refl

succ'_3 : succ' Church.two f x = three f x
succ'_3 = Refl

Omitting f, x, or Church will cause issues.
Having to provide f and x seems necessary to collapse the lambdas, if that wording makes sense at all.
Having to provide Church is part of a problem Idris seems to have in deciding whether something lowercase is an identifier from elsewhere or a fresh type variable.

This isn't a PR since I'm not 100% on what is considered good style yet but I wanted to share that there is a solution.

Add CONTRIBUTING.md

TODO
  • Describe my general plan
    • Copy text
    • Translate code idiomatically
    • Update (edit/augment/delete) text accordingly
    • ... ?
  • Firm up prerequisites (related: #10)
  • Maybe get a good shell.nix sorted (TeX in Nix is pretty broken atm...)
  • Solicit contributions
  • Describe the pandoc workflow, including the hybrid GFM/TeX Literate Idris.
  • Consider ditching the hybrid GFM madness for regular LaTeX
    This turned out to be more annoying that it seemed worth, so I abandoned the idea.

negation_fn_applied_twice

Small question. In the Basics in More Exercises we have task negation_fn_applied_twice. I'm not sure we have a way to solve it using just rewrite (it looks like task is to solve it by rewrite). I was not able to solve it by using rewrite (replace has helped). I'm not sure if it its just me or the task requires a bit more knowledge.

Finish Basics

  • Introduction
  • Enumerated Types
    • Edit first two paragraphs
    • Days of the Week
      • Verify that top-level type signatures are optional required and edit paragraph accordingly
      • Discuss interactive editor support
      • Reword "... after some simplification"
      • Verify the "main uses" claim
    • Booleans
      • Edit the syntax paragraph
    • Function types
      • Confirm the "function types" wording
    • Modules
      • Flesh out description of Idris's module system
      • Discuss namespaces
    • Numbers
      • Figure out how to redefine Nat locally, as in the Coq inner modules, Playground1 and Playground2.
        • plus
        • mult
        • minus
      • Verify the commentary on "wildcard pattern"
  • Proof by Simplification
  • Proof by Rewriting
  • Proof by Case Analysis
    • More on Notation (Optional)
    • Fixpoint and Structural Recursion (Optional)
  • More Exercises

Use Iosevka font

For example, <-> looks bad in Monoid and it doesn't render โˆ€, et al.

Page 18, mult function is wrong

Idris version 1.3.2

mult : (n, m : Nat) -> Nat
mult Z = Z
mult (S k) = plus m (mult k m)

Should be

mult : (n, m : Nat) -> Nat
mult Z _ = Z
mult (S k) m = plus m (mult k m)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.