theorem_proving_in_lean | Theorem proving in Lean

 by   leanprover Python Version: v3.3.0 License: Apache-2.0

kandi X-RAY | theorem_proving_in_lean Summary

kandi X-RAY | theorem_proving_in_lean Summary

theorem_proving_in_lean is a Python library. theorem_proving_in_lean has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However theorem_proving_in_lean build file is not available. You can download it from GitHub.

Theorem proving in Lean
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              theorem_proving_in_lean has a low active ecosystem.
              It has 44 star(s) with 47 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 18 have been closed. On average issues are closed in 50 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of theorem_proving_in_lean is v3.3.0

            kandi-Quality Quality

              theorem_proving_in_lean has 0 bugs and 0 code smells.

            kandi-Security Security

              theorem_proving_in_lean has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              theorem_proving_in_lean code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              theorem_proving_in_lean is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              theorem_proving_in_lean releases are not available. You will need to build from source code and install.
              theorem_proving_in_lean has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              theorem_proving_in_lean saves you 60 person hours of effort in developing the same functionality from scratch.
              It has 156 lines of code, 14 functions and 3 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed theorem_proving_in_lean and discovered the below as its top functions. This is intended to give you an instant insight into theorem_proving_in_lean implemented functionality, and help decide if they suit your requirements.
            • Writes a BeautifulSoup node
            • Return a URI for the given code
            Get all kandi verified functions for this library.

            theorem_proving_in_lean Key Features

            No Key Features are available at this moment for theorem_proving_in_lean.

            theorem_proving_in_lean Examples and Code Snippets

            No Code Snippets are available at this moment for theorem_proving_in_lean.

            Community Discussions

            QUESTION

            prove p or q iff q or p in Lean
            Asked 2020-May-15 at 16:43

            Trying to do the chapter 3 exercises in the lean documentation, but having a hard time understanding all the terminology as I know almost 0 about writing proofs. I want to learn more, but need some help.

            I've just been trial and erroring trying to solve this example:

            example : p ∨ q ↔ q ∨ p := sorry

            not sure where to begin. Is there an answer key I'm missing with explanations?

            ...

            ANSWER

            Answered 2020-May-15 at 16:43

            If the explanations in TPIL aren't helpful, then proposition world of the natural number game might be better https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_game/. I have given a solution, but I'm not sure it will be that helpful if the explanations in TPIL aren't very helpful.

            Here is a solution

            Source https://stackoverflow.com/questions/61764096

            QUESTION

            How to perform multiple exists-eliminations that all share a single multivariate universally-quantified hypothesis?
            Asked 2020-Feb-28 at 23:57

            The Lean documentation shows the following two examples with just a single variable:

            from Theorem Proving in Lean: Existential Quantifiers: ...

            ANSWER

            Answered 2020-Feb-28 at 23:57

            QUESTION

            Some basic Propositional Logic Proofs in Lean
            Asked 2020-Jan-20 at 19:12

            I just read though the documentation of Lean, and try to do the 3.7. Exercises,
            didn't finish all of them yet, but here are the first four exercises (without classical reasoning):

            variables p q r : Prop

            -- commutativity of ∧ and ∨
            example : p ∧ q ↔ q ∧ p := sorry
            example : p ∨ q ↔ q ∨ p := sorry

            -- associativity of ∧ and ∨
            example : (p ∧ q) ∧ r ↔ p ∧ (q ∧ r) := sorry
            example : (p ∨ q) ∨ r ↔ p ∨ (q ∨ r) := sorry

            Here is what I did for that first four exercises:

            ...

            ANSWER

            Answered 2019-Dec-24 at 07:34

            If you import Lean's math's library then the tactic by tauto! should solve all of these. Additionally these are all already library theorems with names like and_comm.

            I don't think there are any shorter proofs of these statements from first principles. The only way you can shorten some of the proofs is by removing the haves and shows and making them less readable. Here's my proof of or_assoc, which is essentially the same as yours, but without the haves and shows.

            Source https://stackoverflow.com/questions/59463903

            QUESTION

            example : ((p ∨ q) → r) → (p → r) ∧ (q → r)
            Asked 2019-Oct-19 at 15:24

            Section 3.6 of Theorem Proving in Lean shows the following:

            ...

            ANSWER

            Answered 2019-Oct-19 at 14:44

            You don't have p ∨ q in the assumptions of this example. So, you have to go from (assume hpqr, _) directly to and_intro. I mean, something like

            Source https://stackoverflow.com/questions/58464712

            QUESTION

            example: (p ∨ q) ∧ (p ∨ r) → p ∨ (q ∧ r)
            Asked 2019-Oct-16 at 07:53

            Section 3.6 of Theorem Proving in Lean shows the following:

            ...

            ANSWER

            Answered 2019-Oct-16 at 07:53

            Your approach, using the first method taught in Theorem Proving In Lean, is not really idiomatic in the sense that the code in Lean's maths library is either written in tactic mode (covered later on in the book) or in full term mode. Here's a tactic mode proof:

            Source https://stackoverflow.com/questions/58406492

            QUESTION

            Definition of choice in Lean
            Asked 2019-Mar-29 at 18:38

            In Lean `choice' is implemented according to:

            Our axiom of choice is now expressed simply as follows:

            ...

            ANSWER

            Answered 2019-Mar-29 at 18:38

            The axiom choice in Lean is indeed not the same as the axiom of choice in set theory. The axiom choice in Lean doesn't really have a corresponding statement in set theory. What is says is that there is a function which takes a proof that some type α is nonempty, and produces an inhabitant of α. In set theory, we cannot define functions which take proofs as arguments, since proofs are not objects in set theory, they are in the layer of logic on top of that.

            That said, the two choice axioms are not completely unrelated. From Leans axiom choice you can prove the more familiar axiom of choice from set theory, one version which you can find here.

            Source https://stackoverflow.com/questions/54764958

            QUESTION

            Proving substitution property of successor over equality
            Asked 2018-Jul-16 at 10:55

            I'm trying to understand inductive types from chapter 7 of "theorem proving in lean".

            I set myself a task of proving that successor of natural numbers has a substitution property over equality:

            ...

            ANSWER

            Answered 2018-Jul-16 at 10:55

            QUESTION

            Defining the predecessor function (with pred 0 = 0) for the natural numbers in Lean
            Asked 2017-Oct-08 at 14:26

            I'm learning the Lean proof assistant. An exercise in https://leanprover.github.io/theorem_proving_in_lean/inductive_types.html is to define the predecessor function for the natural numbers. Can someone help me with that?

            ...

            ANSWER

            Answered 2017-Oct-08 at 14:25

            You are probably familiar with pattern-matching from Lean or some functional programming language, so here is a solution that uses this mechanism:

            Source https://stackoverflow.com/questions/46630527

            QUESTION

            How to write a definition of the non-dependent product using Pi types in Lean?
            Asked 2017-Jul-29 at 19:07

            I'm working through chapter 7 – Inductive Types of "Theorem Proving in Lean".

            I'd like to know how to write the definition of dependent non-dependent product in a more expanded or "primitive" form.

            1. It looks like the definition given in the tutorial automatically infers some detail: inductive prod1 (α : Type u) (β : Type v) | mk : α → β → prod1

            2. Some experimentation allows to fill in the detail inductive prod2 (α : Type u) (β : Type v) : Type (max u v) | mk : α → β → prod2

            3. However giving the definition in a fully expand form, using Pi types fails to typecheck: inductive prod3 : Π (α : Type u) (β : Type v), Type (max u v) | mk : α → β → prod3

            What is the correct way to write prod3?

            Finally, is the following definition equivalent to prod1 and prod2, i.e. can the type checker always infer the correct type universe for α and β?

            1. inductive prod4 (α : Type) (β : Type) | mk : α → β → prod4
            ...

            ANSWER

            Answered 2017-Jul-29 at 14:26

            First off, note that there is nothing dependent about your types. Dependent product is just another name for the Pi type itself (the Pi deriving from the usual mathematical notation for indexed products).

            Your prod2 type is the correct maximally explicit version of prod1. In prod3, you changed α and β from inductive parameters to indices, which as you noticed doesn't work out for universe-related reasons. In general, indices are used to define inductive type families as in section 7.7.

            Finally, the atomic Type you used in prod4 is an abbreviation of Type 1. You can use Type* to have universe parameters inferred automatically.

            Source https://stackoverflow.com/questions/45389457

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install theorem_proving_in_lean

            Make sure you have Lean installed. Use. to clone the repository and install the mathlib library. The build requires python 3 (install python3-venv on ubuntu). The call to make install-deps is only required the first time, and only if you want to use the bundled version of Sphinx and Pygments with improved syntax highlighting for Lean.

            Support

            Pull requests with corrections are welcome. Please follow our commit conventions <https://github.com/leanprover/lean/blob/master/doc/commit_convention.md>. If you have questions about whether a change will be considered helpful, please contact Jeremy Avigad, avigad@cmu.edu.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/leanprover/theorem_proving_in_lean.git

          • CLI

            gh repo clone leanprover/theorem_proving_in_lean

          • sshUrl

            git@github.com:leanprover/theorem_proving_in_lean.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link