Skip to content

Quantifiers #225

Closed
Closed

Description

@WhiteBlackGoose

Neither Mathematica nor SymPy has the existence and universal quantifiers. It would be nice to have them, for example, like that:
exists x in R and x < 3 so x ^ 2 = 4
and
forall x in C exists y in P such Im(x) = y

Activity

  1. added this to the 1.3 milestone on Oct 16, 2020
  2. added
    AcceptedFor proposals, which were approved and will be implemented
    on Mar 24, 2021
  3. Rafael-SOWNet commented on Aug 16, 2026

    @Rafael-SOWNet
    Member

    Measured on master at a45a7256: genuinely unimplemented. Every spelling I tried is a parse error:

    exists x in RR so x^2 = 4     -> UnhandledParseException
    forall x in RR, x^2 >= 0      -> UnhandledParseException
    exists(x, x^2 = 4)            -> UnhandledParseException
    

    Recording it so the issue carries a date rather than an assumption, since a third of the ones I re-measured this week turned out to have been delivered without the checklist noticing.

    The blocker is shared with #248 (Σ, Π) and with #495's syntax half: all three need the grammar to bind a variable — exists x in S, sum(i, …), a => … are the same construct wearing different clothes — and there is no binder in the parser today. ConditionalSet binds one ({ x : p(x) }), so the entity side has the concept; the parser does not generalise it.

    Whichever of the three is built first pays for that machinery and the other two become much cheaper, which seems worth knowing before any of them is scheduled.

  4. modified the milestones: 1.7, 2.7.0 on Sep 18, 2026
  5. Rafael-SOWNet commented on Sep 29, 2026

    @Rafael-SOWNet
    Member

    Delivered by #1421. The body follows : rather than so or such, as in a set builder. The two examples here, on master at dd72825:

    exists x in RR : x < 3 and x^2 = 4             True
    forall x in CC : exists y in PP : Im(x) = y    False
    

    exists!, ∀, ∃ and ∃! are there too. Moved to 2.6.0, which ships it.

  6. modified the milestones: 2.7.0, 2.6.0 on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedFor proposals, which were approved and will be implemented

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions