Metadata-Version: 2.4
Name: pnwratproject
Version: 0.1.2
Summary: A Python Package for evaluating relative propositional functions, logical relations, and equivalence.
Project-URL: Homepage, https://github.com/username/pnwratproject
Project-URL: Documentation, https://github.com/username/pnwratproject#readme
Project-URL: Repository, https://github.com/username/pnwratproject.git
Project-URL: Bug Tracker, https://github.com/username/pnwratproject/issues
Author-email: Nawarat <nawarat.ch@mail.wu.ac.th>
License: MIT
License-File: LICENSE
Keywords: functional relations,logic,logical equivalence,mathematical logic,propositional logic,relative functions
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown

## pnwratproject

ตัวอย่าง Python Package ด้านตรรกศาสตร์และคณิตศาสตร์ดิสครีต ที่พัฒนาด้วยมาตรฐาน **PEP 517** และ **PEP 621**

---

## คำอธิบายแพ็คเกจ (Description)

แพ็คเกจนี้พัฒนาขึ้นเพื่อใช้ในการคำนวณและตรวจสอบโครงสร้างตรรกศาสตร์ทางคณิตศาสตร์ ประกอบด้วย 3 โมดูลหลัก:

* **`propositional`** : คำนวณค่าความจริงของตัวเชื่อมประพจน์พื้นฐาน (NOT, AND, OR, IMPLIES, IFF)
* **`equivalence`** : ตรวจสอบการสมมูล สัจนิรันดร์ ข้อขัดแย้ง และกฎ De Morgan
* **`relations_functions`** : ตรวจสอบคุณสมบัติของความสัมพันธ์ (Reflexive, Symmetric, Transitive) และฟังก์ชัน (Function, 1-to-1)

---

## การติดตั้ง (Installation)

### สำหรับผู้ใช้งานทั่วไป
```bash
pip install pnwratproject
```


## ตัวอย่างการใช้งาน

```python
import myproject as pkg

## ตัวอย่างการใช้งาน (Usage Example)

```python
import pnwratproject as pkg

# ==========================================
# 1. โมดูล propositional (ตัวเชื่อมประพจน์พื้นฐาน)
# ==========================================
print(f"NOT(True) -> {pkg.NOT(True)}")                       # Output: False
print(f"AND(True, False) -> {pkg.AND(True, False)}")         # Output: False
print(f"OR(True, False) -> {pkg.OR(True, False)}")           # Output: True
print(f"IMPLIES(True, False) -> {pkg.IMPLIES(True, False)}") # Output: False
print(f"IFF(True, True) -> {pkg.IFF(True, True)}")           # Output: True


# ==========================================
# 2. โมดูล equivalence (การสมมูลและสัจนิรันดร์)
# ==========================================
res1 = [True, False, True]
res2 = [True, False, True]

# ตรวจสอบการสมมูล
print(f"ผลลัพธ์สมมูลกันหรือไม่ (Is Equivalent): {pkg.is_equivalent(res1, res2)}") # Output: True

# ตรวจสอบสัจนิรันดร์ และข้อขัดแย้ง
print(f"เป็นสัจนิรันดร์หรือไม่ (Is Tautology): {pkg.is_tautology([True, True])}")       # Output: True
print(f"เป็นข้อขัดแย้งหรือไม่ (Is Contradiction): {pkg.is_contradiction([False, False])}") # Output: True

# ตรวจสอบกฎ De Morgan
print(f"De Morgan (AND) ~(True ∧ False): {pkg.de_morgan_and(True, False)}") # Output: True
print(f"De Morgan (OR) ~(True ∨ False): {pkg.de_morgan_or(True, False)}")   # Output: False


# ==========================================
# 3. โมดูล relations_functions (ความสัมพันธ์และฟังก์ชัน)
# ==========================================
domain = [1, 2, 3]
relation = [(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)]

# ตรวจสอบคุณสมบัติความสัมพันธ์
print(f"มีคุณสมบัติสะท้อน (Reflexive): {pkg.is_reflexive(domain, relation)}") # Output: True
print(f"มีคุณสมบัติสมมาตร (Symmetric): {pkg.is_symmetric(relation)}")        # Output: True
print(f"มีคุณสมบัติถ่ายทอด (Transitive): {pkg.is_transitive(relation)}")      # Output: True

# ตรวจสอบฟังก์ชัน และ ฟังก์ชันแบบ 1-to-1
f1 = [(1, 'a'), (2, 'b'), (3, 'c')]
print(f"เป็นฟังก์ชัน (Is Function): {pkg.is_function(domain, f1)}")              # Output: True
print(f"เป็นฟังก์ชันแบบ 1-to-1 (Is One-to-One): {pkg.is_one_to_one(domain, f1)}") # Output: True
```