PHPackages                             noorani-mm/math-implies - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. noorani-mm/math-implies

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

noorani-mm/math-implies
=======================

This package facilitates the solution of discrete mathematical problems.

v1.0.1(2y ago)42MITPHP

Since Jan 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Noorani-MM/Math-implies)[ Packagist](https://packagist.org/packages/noorani-mm/math-implies)[ RSS](/packages/noorani-mm-math-implies/feed)WikiDiscussions v1.x Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Math Implies
============

[](#math-implies)

This package facilitates the solution of discrete mathematical problems.

How to install
--------------

[](#how-to-install)

```
composer require noorani-mm/math-implies
```

How to use
----------

[](#how-to-use)

Provide your desired logical statement as the parameter to the Implies class.

```
$implies = new \Math\Implies\Implies('p->q');
```

**From now on, you can retrieve the required outputs.**

---

Table
-----

[](#table)

It constructs a truth table by placing the column headers in the first row and sequentially adding rows to represent logical conditions.

```
$result = $implies->table
/**
[
  ["p",     "q",  "(p -> q)"], This is columns and others are value
  ["0",     "0",     "1"    ],
  ["0",     "1",     "1"    ],
  ["1",     "0",     "0"    ],
  ["1",     "1",     "1"    ],
]
 */
```

Columns
-------

[](#columns)

It displays the computed logical expressions.

```
$test1 = $implies->columns(); // ['p', 'q', '(p -> q)']
$test2 = $implies->columns;   // ['p', 'q', '(p -> q)']
```

Rows
----

[](#rows)

It returns the result of the truth table computation.

```
$test1 = $implies->rows(); // ["001", "011", "100", "111"]
$test2 = $implies->rows;   // ["001", "011", "100", "111"]
```

PDNF
----

[](#pdnf)

The `pdnf` function returns a string representing the sum of products of the logical statement, obtained by multiplying the components of the logical expression.

Meanwhile, the `pdnf` property returns an array representing individual product terms of the logical expression, where each element corresponds to a specific term obtained by multiplying the components of the logical statement.

```
$string = $implies->pdnf(); // "(~p^~q)v(~p^q)v(p^q)"
$array  = $implies->pdnf;   // ["(~p^~q)", "(~p^q)", "(p^q)"]
```

PCNF
----

[](#pcnf)

The `pcnf` function returns a string representing the Product of Sums Normalized (PCNF) for a logical statement by adding its components.

Meanwhile, the `pcnf` property returns an array representing individual sum terms of the logical expression, with each element corresponding to a specific term obtained by adding the components of the logical statement.

```
$string = $implies->pcnf(); // "(pv~q)"
$array  = $implies->pcnf;   // ["(pv~q)"]
```

minterm
-------

[](#minterm)

The minterm function computes minterms for a logical statement, providing a summarized string representation. The minterm property returns an array of individual minterms, enhancing clarity on the logical conditions.

```
$string = $implies->minterm(); // "Σ(0,1,3)"
$array  = $implies->minterm;   // [0,1,3];
```

maxterm
-------

[](#maxterm)

The maxterm function calculates maxterms for a logical statement, presenting a concise string representation. The maxterm property returns an array of individual maxterms, contributing to a clear understanding of the logical conditions.

```
$string = $implies->maxterm(); // "π(2)"
$array  = $implies->maxterm;   // [2]
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

832d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adc3bc9ac4a10a57a87fce7a8a9839d7057bb9809b4f7e260eaa98c1b4cab455?d=identicon)[Noorani](/maintainers/Noorani)

---

Top Contributors

[![Noorani-MM](https://avatars.githubusercontent.com/u/74505328?v=4)](https://github.com/Noorani-MM "Noorani-MM (34 commits)")

---

Tags

composercomposer-packageimpliesmathematicsphpphpmathmathematicimplies

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/noorani-mm-math-implies/health.svg)

```
[![Health](https://phpackages.com/badges/noorani-mm-math-implies/health.svg)](https://phpackages.com/packages/noorani-mm-math-implies)
```

###  Alternatives

[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
